sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[livejournal] r19455: LJSUP-9250: Bugfix for suspended posts b...

Committer: vtroitsky
LJSUP-9250: Bugfix for suspended posts being showed in journals and friendpages for non authors
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2011-07-08 02:43:05 UTC (rev 19454)
+++ trunk/cgi-bin/ljprotocol.pl	2011-07-08 06:15:16 UTC (rev 19455)
@@ -822,6 +822,7 @@
 
         my $entry = LJ::Entry->new_from_item_hash($ei);
         next unless $entry;
+        next unless $entry->visible_to($u);
 
         # event result data structure
         my %h = ();
@@ -3013,6 +3014,18 @@
         $count++;
         my $evt = {};
         $evt->{'itemid'} = $itemid;
+
+        if ($jposterid != $posterid) {  # now my own post, so need to check for suspended prop
+            my $entry = LJ::Entry->new_from_row(journalid => $ownerid, 
+                                    jitemid => $itemid, 
+                                    allowmask => $mask, 
+                                    posterid => $jposterid, 
+                                    eventtime => $eventtime,
+                                    security => $sec,
+                                    anum => $anum);
+            next if($entry->is_suspended_for($u));
+        }
+
         push @itemids, $itemid;
 
         $evt_from_itemid{$itemid} = $evt;

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