madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r19461: LJSV-1671: bogus keys removed; added lan...

Committer: sbelyaev
LJSV-1671: bogus keys removed; added language variables: event.journal_new_entry.restricted_tag, event.journal_new_entry.restricted_tag.user
U   trunk/bin/upgrading/en.dat
U   trunk/cgi-bin/LJ/Event/JournalNewEntry.pm
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2011-07-12 03:29:04 UTC (rev 19460)
+++ trunk/bin/upgrading/en.dat	2011-07-12 03:49:28 UTC (rev 19461)
@@ -2510,6 +2510,12 @@
 event.journal_new_entry.tag.user|staleness=1
 event.journal_new_entry.tag.user=[[user]] posts a new entry tagged [[tags]]
 
+event.journal_new_entry.restricted_tag.community|staleness=1
+event.journal_new_entry.restricted_tag.community=Someone posts an entry tagged with private or deleted tag to [[user]]
+
+event.journal_new_entry.restricted_tag.user|staleness=1
+event.journal_new_entry.restricted_tag.user=[[user]] posts a new entry tagged with private or deleted tag
+
 event.journal_new_entry.user|staleness=1
 event.journal_new_entry.user=[[user]] posts a new entry.
 

Modified: trunk/cgi-bin/LJ/Event/JournalNewEntry.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/JournalNewEntry.pm	2011-07-12 03:29:04 UTC (rev 19460)
+++ trunk/cgi-bin/LJ/Event/JournalNewEntry.pm	2011-07-12 03:49:28 UTC (rev 19461)
@@ -355,15 +355,27 @@
         }, @tagdropdown);
 
     } elsif ($arg1) {
-        $usertags = LJ::Tags::get_usertags($journal, {remote => $subscr->owner})->{$arg1}->{'name'};
+        my $tags = LJ::Tags::get_usertags($journal, {remote => $subscr->owner}) || {};
+        my $tag_info = $tags->{$arg1} || {};
+        $usertags = $tag_info->{'name'};
     }
 
     if ($arg1) {
-        return LJ::Lang::ml('event.journal_new_entry.tag.' . ($journal->is_comm ? 'community' : 'user'),
-                {
-                    user    => $journal->ljuser_display,
-                    tags    => $usertags,
-                });
+        if ($usertags) {
+            return LJ::Lang::ml('event.journal_new_entry.tag.' .
+                        ($journal->is_comm ? 'community' : 'user'),
+            {
+                user    => $journal->ljuser_display,
+                tags    => $usertags,
+            });
+        } else {
+            return LJ::Lang::ml('event.journal_new_entry.restricted_tag.' .
+                                ($journal->is_comm ? 'community' : 'user'),
+            {
+                user    => $journal->ljuser_display,                        
+            });
+        }
+        
     }
 
     return LJ::Lang::ml('event.journal_new_entry.friendlist') unless $journal;

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