Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[ljcom] r10239: LJSUP-8126: number of spam comments

Committer: mchervonniy
LJSUP-8126: number of spam comments
U   trunk/bin/upgrading/s2layers/3column/layout.s2
U   trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
Modified: trunk/bin/upgrading/s2layers/3column/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/3column/layout.s2	2011-03-16 03:34:38 UTC (rev 10238)
+++ trunk/bin/upgrading/s2layers/3column/layout.s2	2011-03-16 04:21:54 UTC (rev 10239)
@@ -799,11 +799,11 @@
     $e.comments->print();
 
     var string comments_showspam = "";
-    if ($e.comments.count > 0 and not $e.comments.locked) {
+    if ($e.comments.count > 0 and $e.comments.read_spam_url != "") {
         if ($p.showspam) {
-            $comments_showspam = """<a href="$e.comments.read_spam_url"><img src="$*SITEROOT/img/style/3column/spam.png" alt="$*text_hidespam" title="$*text_hidespam ($e.comments.spam_counter)" /></a>""";
+            $comments_showspam = """<img src="$*SITEROOT/img/style/3column/spam.png" alt=\"""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """\" title=\"""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """\" />""";
         } else {
-            $comments_showspam = """<a href="$e.comments.read_spam_url"><img src="$*SITEROOT/img/style/3column/unspam.png" alt="$*text_showspam" title="$*text_showspam ($e.comments.spam_counter)" /></a>""";
+            $comments_showspam = """<a href="$e.comments.read_spam_url"><img src="$*SITEROOT/img/style/3column/unspam.png" alt=\"""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """\" title=\"""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """\" /></a>""";
         }
     } else {
         $comments_showspam = "";

Modified: trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2011-03-16 03:34:38 UTC (rev 10238)
+++ trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2011-03-16 04:21:54 UTC (rev 10239)
@@ -748,14 +748,14 @@
 
         # spam link
         var string comments_showspam = "";
-        if ($.comments.count > 0 and not $.comments.locked) {
+        if ($.comments.count > 0 and $.comments.read_spam_url != "") {
             if ($p.showspam) {
-                $comments_showspam = """ <a href="$.comments.read_spam_url">$*text_hidespam ($.comments.spam_counter)</a> """;
+                $comments_showspam = get_plural_phrase($.comments.spam_counter, "text_read_spam_comments");
             } else {
-                $comments_showspam = """ <a href="$.comments.read_spam_url">$*text_showspam ($.comments.spam_counter)</a> """;
+                $comments_showspam = """ <a href="$.comments.read_spam_url">""" + get_plural_phrase($.comments.spam_counter, "text_read_all_spam_comments") + """</a> """;
             }
+            print safe """ &middot; $comments_showspam""";
         }
-        print safe """ &middot; $comments_showspam""";
 
 if (not $.comments.locked) {
         " &middot; ";

Tags: fiskus_boulder, ljcom, s2
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