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

[livejournal] r17734: LJSUP-7052. Backward compatibility for v...

Committer: gprochaev
LJSUP-7052. Backward compatibility for verticals

U   branches/r72.1/cgi-bin/LJ/Browse.pm
Modified: branches/r72.1/cgi-bin/LJ/Browse.pm
===================================================================
--- branches/r72.1/cgi-bin/LJ/Browse.pm	2010-11-19 08:22:58 UTC (rev 17733)
+++ branches/r72.1/cgi-bin/LJ/Browse.pm	2010-11-19 08:35:42 UTC (rev 17734)
@@ -239,11 +239,15 @@
 
 sub load_all {
     my $class = shift;
+    my $vertical = shift;
 
     my $dbh = LJ::get_db_reader()
         or die "unable to contact global db slave to load categories";
 
-    my $sth = $dbh->prepare("SELECT * FROM category");
+    my $vert_id = $vertical ? $vertical->vert_id : 0;
+        my $where = " WHERE vert_id = $vert_id ";
+
+    my $sth = $dbh->prepare("SELECT * FROM category" . $where);
     $sth->execute;
     die $dbh->errstr if $dbh->err;
 

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