Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r17697: extract parent text correctly

Committer: ailyin
extract parent text correctly
U   trunk/cgi-bin/LJ/Comment.pm
Modified: trunk/cgi-bin/LJ/Comment.pm
===================================================================
--- trunk/cgi-bin/LJ/Comment.pm	2010-11-16 09:00:38 UTC (rev 17696)
+++ trunk/cgi-bin/LJ/Comment.pm	2010-11-16 09:15:25 UTC (rev 17697)
@@ -1543,13 +1543,15 @@
     my $targetu = shift;           # target user, who should be notified about the comment
     my $t       = shift;           # LJ::HTML::Template object - template of the notification e-mail
 
-    my $parent  = $self->parent || $self->entry;
+    my $entry   = $self->entry;
+    my $parent  = $self->parent;
 
     $self->_format_template_mail($targetu, $t);
 
     # add specific for PLAIN-TEXT params
-    $t->param(parent_text        => $parent->body_raw);
-    $t->param(poster_text        => $self->body_raw);
+    $t->param( parent_text        => $parent ? $parent->body_raw
+                                             : $entry->event_raw );
+    $t->param( poster_text        => $self->body_raw );
 
     my $email_subject = $self->subject_raw;
     $email_subject = "Re: $email_subject" if $email_subject and $email_subject !~ /^Re:/;

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