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

[livejournal] r18600: LJSUP-8194. Post from suspend accounts s...

Committer: gprochaev
LJSUP-8194. Post from suspend accounts showing in the recent posts

U   trunk/bin/worker/category-recent-posts
U   trunk/cgi-bin/LJ/Browse.pm
Modified: trunk/bin/worker/category-recent-posts
===================================================================
--- trunk/bin/worker/category-recent-posts	2011-03-17 07:31:48 UTC (rev 18599)
+++ trunk/bin/worker/category-recent-posts	2011-03-17 07:36:20 UTC (rev 18600)
@@ -74,6 +74,7 @@
             my $e_obj = LJ::Entry->new ($u->{userid}, jitemid => $entry->{itemid});
             my $poster = $e_obj->poster;
             next if $poster->is_suspended;
+            next if $e_obj->is_suspended;
             my @tags = $e_obj->tags;
             if (scalar @tags) {
                 my $cat = LJ::Browse->load_by_id ($rec->{catid});

Modified: trunk/cgi-bin/LJ/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Browse.pm	2011-03-17 07:31:48 UTC (rev 18599)
+++ trunk/cgi-bin/LJ/Browse.pm	2011-03-17 07:36:20 UTC (rev 18600)
@@ -994,7 +994,11 @@
             );
             push @found_posts, @$post_ids if $post_ids;
         }
-        @entries = 
+        @entries =
+            grep {
+                my $poster = $_->poster;
+                $_->is_suspended || $poster->is_suspended ? 0 : 1;
+            }
             map { LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid}) }      ## Create LJ::Entry object
             grep { $_->{journalid} }                                                ## remove SEO posts
             @found_posts;
@@ -1008,7 +1012,13 @@
                     LIMIT $limit", 
                 { Slice => {} }
             );
-            @entries = map { LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid}) } @$post_ids;
+            @entries =
+                grep {
+                    my $poster = $_->poster;
+                    $_->is_suspended || $poster->is_suspended ? 0 : 1;
+                }
+                map { LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid}) }
+                @$post_ids;
         }
     }
     return @entries;

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