madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20931: LJSUP-10996: Fix: Can't locate object me...

Committer: sbelyaev
LJSUP-10996: Fix: Can't locate object method "event"
U   trunk/cgi-bin/LJ/Widget/EntryChooser.pm
Modified: trunk/cgi-bin/LJ/Widget/EntryChooser.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryChooser.pm	2012-01-19 08:56:34 UTC (rev 20930)
+++ trunk/cgi-bin/LJ/Widget/EntryChooser.pm	2012-01-19 09:44:23 UTC (rev 20931)
@@ -61,7 +61,13 @@
         my $edit_link   = $edit_link_base . 'mode=edit';
         my $delete_link = $edit_link_base . 'mode=delete';
 
-        my $entry_url     = $entry->url;
+        my $entry_url;
+        if (!$entry->is_delayed) {
+            $entry_url = $entry->url;
+        } else {
+            my $delayed_id = $entry->delayedid;
+            $entry_url = "javascript:showEntry($delayed_id);";
+        }
         my $entry_subject = $entry->subject_text;
 
         my $alldateparts;
@@ -70,14 +76,15 @@
         } else {
             $alldateparts = LJ::TimeUtil->alldatepart_s2($entry->{'eventtime'});
         }
+
         my ($year, $mon, $mday, $hour, $min) = split(/\D/, $alldateparts);
         my $monthlong = BML::ml(LJ::Lang::month_long_langcode($mon));
 
         my $datetext = $opts->{'scheduled'};
         my $date_display = "$datetext $monthlong $mday, $year, $hour:$min";
 
-        my $entry_text_display =
-            LJ::ehtml( LJ::durl( $entry->event ) );
+        my $event_raw = $entry->is_delayed ? $entry->event : $entry->event_raw;
+        my $entry_text_display = LJ::ehtml( LJ::durl( $event_raw ) );
         $entry_text_display =~ s{\n}{<br />}g;
 
         my $entry_taglist = '';

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