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

[livejournal] r17757: LJSUP-7052.

Committer: gprochaev
LJSUP-7052.

U   trunk/bin/worker/category-recent-posts
U   trunk/htdocs/admin/browse/recent_posts.bml
Modified: trunk/bin/worker/category-recent-posts
===================================================================
--- trunk/bin/worker/category-recent-posts	2010-11-23 10:44:55 UTC (rev 17756)
+++ trunk/bin/worker/category-recent-posts	2010-11-23 11:08:56 UTC (rev 17757)
@@ -50,7 +50,7 @@
 
     my $dbh = LJ::get_db_writer();
 
-    my $journals = $dbh->selectall_arrayref ("SELECT catid, journalid FROM categoryjournals", { Slice => {} });
+    my $journals = $dbh->selectall_arrayref ("SELECT cj.catid, cj.journalid FROM categoryjournals cj, category c WHERE cj.catid = c.catid AND c.vert_id <> 0", { Slice => {} });
     foreach my $rec (@$journals) {
         my $journalid = $rec->{journalid};
         my @last_jitemid = $dbh->selectrow_array ("SELECT max(jitemid) FROM category_recent_posts WHERE journalid = ?", undef, $journalid);

Modified: trunk/htdocs/admin/browse/recent_posts.bml
===================================================================
--- trunk/htdocs/admin/browse/recent_posts.bml	2010-11-23 10:44:55 UTC (rev 17756)
+++ trunk/htdocs/admin/browse/recent_posts.bml	2010-11-23 11:08:56 UTC (rev 17757)
@@ -65,7 +65,7 @@
         my $skip = ($page-1) * $page_size;
         my $last = $skip + $page_size;
 
-        my @posts = LJ::Browse->search_posts(\@communities, "$skip,$page_size");
+        my @posts = LJ::Browse->search_posts( comms => \@communities, page_size => "$skip,$page_size", vertical => $vertical );
 
         foreach (@posts) {
             my $url = $_->url;

Tags: bml, livejournal, 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