madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20365: LJSUP-10119: Preview entry shows as stic...

Committer: sbelyaev
LJSUP-10119: Preview entry shows as sticky
U   trunk/cgi-bin/LJ/Entry.pm
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2011-10-18 11:59:37 UTC (rev 20364)
+++ trunk/cgi-bin/LJ/Entry.pm	2011-10-18 12:16:29 UTC (rev 20365)
@@ -1464,7 +1464,9 @@
     my ($self) = @_;
 
     my $u = $self->{u};
-    return $self->jitemid == $u->get_sticky_entry_id();
+    my $sticky_entry_id = $u->get_sticky_entry_id();
+    return 0 unless $sticky_entry_id;
+    return $self->jitemid == $sticky_entry_id;
 }
 
 sub can_delete_journal_item {

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