Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r20094: LJSUP-9838: recent with S1 fixed (with d...

Committer: gariev
LJSUP-9838: recent with S1 fixed (with delayed entries)
U   branches/delayed_entries/cgi-bin/ljviews.pl
Modified: branches/delayed_entries/cgi-bin/ljviews.pl
===================================================================
--- branches/delayed_entries/cgi-bin/ljviews.pl	2011-09-21 02:49:36 UTC (rev 20093)
+++ branches/delayed_entries/cgi-bin/ljviews.pl	2011-09-21 03:28:02 UTC (rev 20094)
@@ -1208,17 +1208,21 @@
         $viewsome = $viewall || LJ::check_priv($remote, 'canview', 'suspended');
     }
     
-    my $delayed_entries = [];
+    my $delayed_entries;
 
     if ($u->has_sticky_entry && !$skip) {
         $delayed_entries = LJ::DelayedEntry->get_entries_by_journal($u, $skip, $itemshow - 1);
     } else {
         $delayed_entries = LJ::DelayedEntry->get_entries_by_journal($u, $skip, $itemshow + 1);
     }
+    
+    if (!$delayed_entries) {
+        $delayed_entries = [];
+    }
 
     my $itemshow_usual = $itemshow - scalar(@$delayed_entries);
     if ( $itemshow <= scalar(@$delayed_entries) ) {
-            $itemshow_usual = -1;
+       $itemshow_usual = -1;
     }
 
     ## load the itemids

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