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

[livejournal] r18615: LJSUP-8194. Minor fix

Committer: gprochaev
LJSUP-8194. Minor fix

U   trunk/cgi-bin/LJ/Browse.pm
Modified: trunk/cgi-bin/LJ/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Browse.pm	2011-03-17 09:46:16 UTC (rev 18614)
+++ trunk/cgi-bin/LJ/Browse.pm	2011-03-17 09:49:52 UTC (rev 18615)
@@ -997,9 +997,12 @@
         @entries =
             grep {
                 ## Filter off suspended entries, deleted communities, suspended posters
-                return 0 unless $_ && $_->valid;
-                my $poster = $_->poster;
-                $_->is_suspended || $_->journal->is_deleted || ($poster && $poster->is_suspended) ? 0 : 1;
+                if ($_ && $_->valid) {
+                    my $poster = $_->poster;
+                    $_->is_suspended || $_->journal->is_deleted || ($poster && $poster->is_suspended) ? 0 : 1;
+                } else {
+                    0;
+                }
             }
             map { LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid}) }      ## Create LJ::Entry object
             grep { $_->{journalid} }                                                ## remove SEO posts
@@ -1017,9 +1020,12 @@
             @entries =
                 grep {
                     ## Filter off suspended entries, deleted communities, suspended posters
-                    return 0 unless $_ && $_->valid;
-                    my $poster = $_->poster;
-                    $_->is_suspended || $_->journal->is_deleted || ($poster && $poster->is_suspended) ? 0 : 1;
+                    if ($_ && $_->valid) {
+                        my $poster = $_->poster;
+                        $_->is_suspended || $_->journal->is_deleted || ($poster && $poster->is_suspended) ? 0 : 1;
+                    } else {
+                        0;
+                    }
                 }
                 map { LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid}) }
                 @$post_ids;

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