madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20146: LJSUP-9307: recent entries pages fix

Committer: sbelyaev
LJSUP-9307: recent entries pages fix
U   trunk/cgi-bin/LJ/S2/RecentPage.pm
Modified: trunk/cgi-bin/LJ/S2/RecentPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/RecentPage.pm	2011-09-28 02:28:56 UTC (rev 20145)
+++ trunk/cgi-bin/LJ/S2/RecentPage.pm	2011-09-28 02:41:08 UTC (rev 20146)
@@ -78,7 +78,7 @@
     if ( $u->has_sticky_entry && !$skip) {
         $delayed_entries = LJ::DelayedEntry->get_entries_by_journal($u, $skip, $itemshow - 1) ;
     } elsif ( $u->has_sticky_entry && $skip) {
-        $delayed_entries = LJ::DelayedEntry->get_entries_by_journal($u, $skip - 1, $itemshow + 1);
+        $delayed_entries = LJ::DelayedEntry->get_entries_by_journal($u, $skip - 1, $itemshow);
     } else {
         $delayed_entries = LJ::DelayedEntry->get_entries_by_journal($u, $skip, $itemshow + 1);
     }
@@ -97,6 +97,9 @@
     if ( $itemshow <= scalar(@$delayed_entries) ) {
             $itemshow_usual -= 1;
     }
+    if ( $itemshow_usual < 0 ) {
+        $itemshow_usual = 0;
+    }
 
     ## load the itemids
     my @itemids;
@@ -167,7 +170,7 @@
          !$u->has_sticky_entry()) ) {
         __append_delayed( $u, $delayed_entries,  $p->{'entries'} );
     }
-    
+  warn scalar (@items); 
   ENTRY:
     foreach my $item (@items)
     {

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