madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20359: LJSUP-10152: delayed enties and sticky p...

Committer: sbelyaev
LJSUP-10152: delayed enties and sticky post are disabled
U   trunk/cgi-bin/ljviews.pl
Modified: trunk/cgi-bin/ljviews.pl
===================================================================
--- trunk/cgi-bin/ljviews.pl	2011-10-18 11:13:09 UTC (rev 20358)
+++ trunk/cgi-bin/ljviews.pl	2011-10-18 11:17:20 UTC (rev 20359)
@@ -1210,10 +1210,12 @@
     
     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 (LJ::is_enabled("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) {
@@ -1479,8 +1481,10 @@
             $vars->{'LASTN_EVENT_PRIVATE'}) { $var = 'LASTN_EVENT_PRIVATE'; }
         if ($security eq "usemask" &&
             $vars->{'LASTN_EVENT_PROTECTED'}) { $var = 'LASTN_EVENT_PROTECTED'; }
-        $var .= '_STICKY' if $entry_obj->is_sticky();
-        $var .= '_DELAYED' if $entry_obj->is_delayed();
+        if (LJ::is_enabled("delayed_entries")) {
+            $var .= '_STICKY' if $entry_obj->is_sticky();
+            $var .= '_DELAYED' if $entry_obj->is_delayed();
+        }
 
         $$events .= LJ::fill_var_props($vars, $var, \%lastn_event);
         LJ::run_hook('notify_event_displayed', $entry_obj);
@@ -2766,8 +2770,10 @@
             $vars->{'DAY_EVENT_PRIVATE'}) { $var = 'DAY_EVENT_PRIVATE'; }
         if ($security eq "usemask" &&
             $vars->{'DAY_EVENT_PROTECTED'}) { $var = 'DAY_EVENT_PROTECTED'; }
-        #$var .= '_STICKY' if $entry_obj->is_sticky();
-        $var .= '_DELAYED' if $entry_obj->is_delayed();
+        if (LJ::is_enabled("delayed_entries")) {
+            #$var .= '_STICKY' if $entry_obj->is_sticky();
+            $var .= '_DELAYED' if $entry_obj->is_delayed();
+        }
 
         $events .= LJ::fill_var_props($vars, $var, \%day_event);
 
@@ -2922,7 +2928,8 @@
     }
 
     foreach my $item (@$items) {
-        if ($u->get_sticky_entry_id() == $item->{itemid}) {
+        if ($u->get_sticky_entry_id() == $item->{itemid} &&
+                 LJ::is_enabled("delayed_entries")) {
             push @ordered, $item;
             next;        }
 

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