wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18138: LJSUP-7803. Not working Community Direct...

Committer: gprochaev
LJSUP-7803. Not working Community Directory

U   trunk/cgi-bin/LJ/Widget/Browse.pm
Modified: trunk/cgi-bin/LJ/Widget/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Browse.pm	2011-01-28 11:45:52 UTC (rev 18137)
+++ trunk/cgi-bin/LJ/Widget/Browse.pm	2011-01-28 11:47:12 UTC (rev 18138)
@@ -11,12 +11,11 @@
 use LJ::Browse::Parser;
 
 sub _build_tree {
-    my ($parent, $level, $test_uri, $vertical, @categories) = @_;
+    my ($parentid, $level, $test_uri, $vertical, @categories) = @_;
     my @tree = ();
 
     foreach my $c
-        (grep { (!$parent && !$_->parent) || ($_->parent == $parent) } grep { $_ } @categories) {
-        #(grep { $_->parent == $parent } @categories) {
+        (grep { (!$parentid && !$_->parentid) || ($_->parentid == $parentid) } grep { $_ } @categories) {
             my $c_uri = $c->uri;
 
             my $is_current = ($test_uri =~ m/^\Q$c_uri\E/);
@@ -31,7 +30,7 @@
                     level           => $level,
                     is_expanded     => $is_current,
                     is_current      => $is_current,
-                    "level$level"   => [ _build_tree($c, $level, $test_uri, $vertical, @categories) ],
+                    "level$level"   => [ _build_tree($c->catid, $level, $test_uri, $vertical, @categories) ],
                 };
             --$level;
         }

Tags: livejournal, pm, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments