Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r21509: LJSUP-11582: Comment from pingback_bot c...

Committer: amyshkin
LJSUP-11582: Comment from pingback_bot cames in English
U   trunk/cgi-bin/LJ/PingBack.pm
Modified: trunk/cgi-bin/LJ/PingBack.pm
===================================================================
--- trunk/cgi-bin/LJ/PingBack.pm	2012-03-22 11:55:14 UTC (rev 21508)
+++ trunk/cgi-bin/LJ/PingBack.pm	2012-03-22 12:06:19 UTC (rev 21509)
@@ -48,15 +48,19 @@
                     ? ($source_entry->subject_raw || LJ::Lang::ml("pingback.sourceURI.default_title"))
                     : ($title || LJ::Lang::ml("pingback.sourceURI.default_title"));
 
+    my $journal = $target_entry->journal;
+    LJ::load_user_props($journal, 'browselang');
+    my $lang    = $journal->{'browselang'};
+
     my $comment = LJ::Comment->create(
         state   => 'S', # this comment should be 'Screened'
-        journal => $target_entry->journal,
+        journal => $journal,
         ditemid => $target_entry->ditemid,
         poster  => $poster_u,
 
         body    => ($source_entry
             ? LJ::Lang::get_text(
-                $target_entry->journal->{'browselang'},
+                $lang,
                 "pingback.ljping.comment.text",
                 undef,
                 {
@@ -66,7 +70,7 @@
                     poster    => $source_entry->poster->username,
               })
             : LJ::Lang::ml(
-                $target_entry->journal->{'browselang'},
+                $lang,
                 "pingback.public.comment.text",
                 undef,
                 {
@@ -79,7 +83,7 @@
         props   => { picture_keyword => $LJ::PINGBACK->{userpic} },
     );
 
-    LJ::Talk::screen_comment($target_entry->journal, $target_entry->jitemid, $comment->jtalkid)
+    LJ::Talk::screen_comment($journal, $target_entry->jitemid, $comment->jtalkid)
         if ref $comment;
 
     return $comment;

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