madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20560: LJSUP-10435: Remove delayed entries from...

Committer: sbelyaev
LJSUP-10435: Remove delayed entries from 'Month page'
U   trunk/cgi-bin/LJ/S2/MonthPage.pm
Modified: trunk/cgi-bin/LJ/S2/MonthPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/MonthPage.pm	2011-11-17 12:21:22 UTC (rev 20559)
+++ trunk/cgi-bin/LJ/S2/MonthPage.pm	2011-11-17 12:29:05 UTC (rev 20560)
@@ -78,15 +78,6 @@
     my @items;
     push @items, $_ while $_ = $sth->fetchrow_hashref;
     
-    my @ditems = ();
-    if (LJ::is_enabled("delayed_entries")) {
-        @ditems = LJ::DelayedEntry->get_entries_for_month($u, $year, $month, $dateformat, $secwhere);
-
-        foreach my $ditem (@ditems) {
-            push @items, $ditem;
-        }
-    }
-    
     @items = sort { $a->{'alldatepart'} cmp $b->{'alldatepart'} } @items;
 
     my @itemids = map { $_->{'jitemid'} } @items;
@@ -117,16 +108,8 @@
         my $day = $item->{'day'};
 
         my $ditemid = $itemid*256 + $anum;
-        my $entry_obj; 
-        if ($item->{delayedid}) {
-            $entry_obj = LJ::DelayedEntry->get_entry_by_id($u, $item->{delayedid});
-        } else {
-            $entry_obj = LJ::Entry->new($u, ditemid => $ditemid);
-        }
-        
-        if (!$entry_obj->is_delayed()) {
-            $entry_obj->handle_prefetched_props($logprops{$itemid});
-        }
+        my $entry_obj  = LJ::Entry->new($u, ditemid => $ditemid);
+        $entry_obj->handle_prefetched_props($logprops{$itemid}); 
 
         # don't show posts from suspended users or suspended posts
         my $pu = $pu{$posterid};
@@ -148,10 +131,6 @@
             LJ::item_toutf8($u, \$subject, \$text, $logprops{$itemid});
         }
         
-        if ($entry_obj->is_delayed) {
-            $subject = $entry_obj->subject;
-        }
-
         if ($opt_text_subjects) {
             LJ::CleanHTML::clean_subject_all(\$subject);
         } else {
@@ -160,7 +139,7 @@
 
         my $nc = "";
         $nc .= "nc=$replycount" if $replycount && $remote && $remote->{'opt_nctalklinks'};
-        my $permalink = $entry_obj->is_delayed ? $entry_obj->url : "$journalbase/$ditemid.html";
+        my $permalink = "$journalbase/$ditemid.html";
         my $readurl = $permalink;
         $readurl .= "?$nc" if $nc;
         my $posturl = $permalink . "?mode=reply";
@@ -198,7 +177,6 @@
             'comments' => $comments,
             'userpic' => $userpic,
             'permalink_url' => $permalink,
-            'delayedid' => $entry_obj->is_delayed ? $entry_obj->delayedid : undef,
         });
 
         push @{$day_entries{$day}}, $entry;

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