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

[livejournal] r17963: LJSUP-7610. Need to remove old recent po...

Committer: gprochaev
LJSUP-7610. Need to remove old recent posts from verticals

U   trunk/bin/maint/clean_caches.pl
Modified: trunk/bin/maint/clean_caches.pl
===================================================================
--- trunk/bin/maint/clean_caches.pl	2010-12-17 08:43:46 UTC (rev 17962)
+++ trunk/bin/maint/clean_caches.pl	2010-12-17 09:10:01 UTC (rev 17963)
@@ -172,7 +172,7 @@
     my $comms = $for_in ? $dbh->selectall_arrayref ("SELECT journalid FROM categoryjournals WHERE catid IN($for_in)", { Slice => {} }) : [];
     my $cnt_delete = 0;
     foreach my $comm (@$comms) {
-        my $posts = $dbh->selectall_arrayref ("SELECT jitemid FROM category_recent_posts WHERE journalid = ? ORDER BY timecreate ASC", { Slice => {} }, $comm->{'journalid'});
+        my $posts = $dbh->selectall_arrayref ("SELECT jitemid FROM category_recent_posts WHERE journalid = ? ORDER BY timecreate DESC", { Slice => {} }, $comm->{'journalid'});
         splice @$posts, 0, 30;
         $cnt_delete += @#{$posts};
         my $in_to_delete = join ',', map { $_->{jitemid} } @$posts;

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