madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22559: LJSUP-12902: Create notifications for re...

Committer: sbelyaev
LJSUP-12902: Create notifications for reposts
U   trunk/bin/upgrading/en.dat
U   trunk/cgi-bin/LJ/Event/JournalNewRepost.pm
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2012-08-03 07:50:12 UTC (rev 22558)
+++ trunk/bin/upgrading/en.dat	2012-08-03 08:33:06 UTC (rev 22559)
@@ -1735,6 +1735,9 @@
 esn.add_friend|staleness=1
 esn.add_friend=[[openlink]]Add [[journal]] to your Friends list[[closelink]]
 
+esn.add_friend_reposter|staleness=1
+esn.add_friend_reposter=[[openlink]]Add [[reposter]] to your Friends list[[closelink]]
+
 esn.add_friend_community|staleness=1
 esn.add_friend_community=[[openlink]]Add community "[[community]]" to your friends page reading list[[closelink]]
 

Modified: trunk/cgi-bin/LJ/Event/JournalNewRepost.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/JournalNewRepost.pm	2012-08-03 07:50:12 UTC (rev 22558)
+++ trunk/cgi-bin/LJ/Event/JournalNewRepost.pm	2012-08-03 08:33:06 UTC (rev 22559)
@@ -341,7 +341,16 @@
 
     # Some special community (e.g. writersblock) don't want join option in esn.
     $show_join_option = 0 if $show_join_option && LJ::run_hook('esn_hide_join_option_for_' . $self->entry->journal->user);
+    
+    # make hyperlinks for options
+    # tags 'poster' and 'journal' cannot contain html <a> tags
+    # when it used between [[openlink]] and [[closelink]] tags.
+    my $vars = { poster    => $reposter_name,
+                 reposter  => $reposter_name,
+                 journal   => $journal,
+                 community => $journal, };
 
+
     $email .= LJ::Lang::get_text($lang, 'esn.you_can', undef) .
         $self->format_options($is_html, $lang, $vars,
             {
@@ -351,7 +360,7 @@
                 'esn.join_community'        => [ $show_join_option ? 3 : 0,
                                                     "$LJ::SITEROOT/community/join.bml?comm=$journal_user" ],
                 'esn.read_user_entries'     => [ 1, $journal_url ],
-                'esn.add_friend'            => [ LJ::is_friend($u, $self->reposter)? 0 : 5,
+                'esn.add_friend_reposter'   => [ LJ::is_friend($u, $self->reposter)? 0 : 5,
                                                     "$LJ::SITEROOT/friends/add.bml?user=" . $reposter->user  ],
             });
 

Tags: dat, 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