madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20559: LJSUP-10433: Remove delayed entries from...

Committer: sbelyaev
LJSUP-10433: Remove delayed entries from 'day page'
U   trunk/cgi-bin/LJ/S2/DayPage.pm
Modified: trunk/cgi-bin/LJ/S2/DayPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/DayPage.pm	2011-11-17 12:01:23 UTC (rev 20558)
+++ trunk/cgi-bin/LJ/S2/DayPage.pm	2011-11-17 12:21:22 UTC (rev 20559)
@@ -95,16 +95,6 @@
     LJ::load_log_props2($dbcr, $u->{'userid'}, \@itemids, \%logprops);
     $logtext = LJ::get_logtext2($u, @itemids);
 
-    my @ditems = ();
-    if (LJ::is_enabled("delayed_entries")) {
-        @ditems = LJ::DelayedEntry->get_entries_for_day($u, $year, $month, $day, $dateformat, $secwhere);
-        foreach my $ditem (@ditems) {
-            if ($ditem) {
-                push @items, $ditem;
-            }
-        }
-    }
-
     my (%apu, %apu_lite);  # alt poster users; UserLite objects
     foreach (@items) {
         next unless $_->{'posterid'} != $u->{'userid'};
@@ -127,25 +117,14 @@
             map { $item->{$_} } qw(posterid itemid security allowmask alldatepart anum);
 
         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);
-            $entry_obj->handle_prefetched_props($logprops{$itemid});
-        }
+        my $entry_obj = LJ::Entry->new($u, ditemid => $ditemid);
+        $entry_obj->handle_prefetched_props($logprops{$itemid});
         
-        my ($replycount, $subject, $text);
-        if ($item->{delayedid}) {
-            $replycount = 0;
-            $subject = $entry_obj->subject;
-            $text = $entry_obj->event;
-        } else {
-            $replycount = $logprops{$itemid}->{'replycount'} || 0;
-            $subject = $logtext->{$itemid}->[0];
-            $text = $logtext->{$itemid}->[1];
-        }
         
+        my $replycount = $logprops{$itemid}->{'replycount'} || 0;
+        my $subject = $logtext->{$itemid}->[0];
+        my $text = $logtext->{$itemid}->[1];
+        
         if ($get->{'nohtml'}) {
             # quote all non-LJ tags
             $subject =~ s{<(?!/?lj)(.*?)>} {&lt;$1&gt;}gi;
@@ -190,7 +169,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";
@@ -244,7 +223,6 @@
             'security' => $security,
             'allowmask' => $allowmask,
             'props' => $logprops{$itemid},
-            'delayedid' => $entry_obj->is_delayed ? $entry_obj->delayedid : undef,
             'itemid' => $ditemid,
             'journal' => $userlite_journal,
             'poster' => $userlite_poster,

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