category problem

Please report bugs here!

Moderator: Thorsten

Post Reply
Tam
Posts: 1
Joined: Thu Sep 09, 2004 7:14 am

category problem

Post by Tam »

Hello,
I'm using 1.4.1.

I created the category as
aaa
-bbb
--ccc
ddd
eee
It is displayed as
aaa
-bbb
--ccc
-ddd
-eee
I thought that "</ul>" was insufficient and corrected the script.

inc/category.php
before

Code: Select all

            if ($this->treeTab[$y]["level"] < $open) {
                $output .= "</li>\n".str_repeat("\t", $this->treeTab[$y]["level"]+2)."</ul>\n".str_repeat("\t", $this->treeTab[$y]["level"]+1)."</li>\n";
                }
after

Code: Select all

            if ($this->treeTab[$y]["level"] < $open) {
                $output .= "</li>\n";
                for ($down = $open; $down > $this->treeTab[$y]["level"]; $down--){
                    $output .= str_repeat("\t", $down+1)."</ul>\n";
                    }
                $output .= str_repeat("\t", $this->treeTab[$y]["level"]+1)."</li>\n";
                }
This is contained in viewTree() and printCategories().
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

thanks for this patch. I will include it asap.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply