madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20122: LJSUP-9848: fixed output with no sticky ...

Committer: sbelyaev
LJSUP-9848: fixed output with no sticky entry
U   branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm
U   branches/delayed_entries/cgi-bin/LJ/User.pm
Modified: branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm
===================================================================
--- branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm	2011-09-23 06:11:48 UTC (rev 20121)
+++ branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm	2011-09-23 06:59:11 UTC (rev 20122)
@@ -89,7 +89,7 @@
 
     if ( $skip && $usual_skip < 0 && $u->has_sticky_entry ) {
         $usual_skip = 1;
-    } elsif ( $skip && $usual_skip < 0) {
+    } elsif ( $skip && $usual_skip < 0 ) {
         $usual_skip = 0;
     }
 
@@ -161,8 +161,10 @@
 
     my $userlite_journal = UserLite($u);
     my $sticky_appended = !$u->has_sticky_entry() || $skip;
-    
-    if ( scalar(@$delayed_entries) > 0 && ( $sticky_appended && $u->has_sticky_entry()) ) {
+
+    if ( scalar(@$delayed_entries) > 0 && \
+        ( $skip && $u->has_sticky_entry()) || 
+         !$u->has_sticky_entry()) {
         __append_delayed( $u, $delayed_entries,  $p->{'entries'} );
     }
     

Modified: branches/delayed_entries/cgi-bin/LJ/User.pm
===================================================================
--- branches/delayed_entries/cgi-bin/LJ/User.pm	2011-09-23 06:11:48 UTC (rev 20121)
+++ branches/delayed_entries/cgi-bin/LJ/User.pm	2011-09-23 06:59:11 UTC (rev 20122)
@@ -6151,7 +6151,7 @@
 # return sticky entries existing
 sub has_sticky_entry {
     my ($self) = @_;
-    return !!$self->prop("sticky_entries");
+    return !!$self->prop("sticky_entries") || 0;
 }
 
 # returns sticky entry jitemid

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