alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[ljcom] r10232: LJSUP-8126: System doesn't display numbe...

Committer: afedorov
LJSUP-8126: System doesn't display number of spam comments

U   trunk/bin/upgrading/s2layers/sup/layout.s2
Modified: trunk/bin/upgrading/s2layers/sup/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/layout.s2	2011-03-14 09:25:32 UTC (rev 10231)
+++ trunk/bin/upgrading/s2layers/sup/layout.s2	2011-03-14 10:05:27 UTC (rev 10232)
@@ -916,7 +916,7 @@
         $corners1_3 = """<i class="cornerz cornerz-top"><b></b></i>""";
     }
     var string comments_count = string($e.comments.count);
-    if ($.viewing_thread) {
+    if ($.viewing_thread or $p.showspam) {
         var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
         $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
     } else {
@@ -938,18 +938,12 @@
 """;
         "<a name='comments'></a>";
         var string comments_showspam = "";
-        if ($e.comments.count > 0 and not $.entry.comments.locked and $e.comments.read_spam_url != "") {
+        if ($e.comments.count > 0 and $e.comments.read_spam_url != "") {
             if ($p.showspam) {
-                $comments_showspam = """<span class="comments-hidespam"><a href=\"$e.comments.read_spam_url\">$*text_hidespam ($e.comments.spam_counter)</a></span> <span class="emdash">—</span> """;
+                $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """;
             } else {
-                $comments_showspam = """<span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">$*text_showspam ($e.comments.spam_counter)</a></span> <span class="emdash">—</span> """;
+                $comments_showspam = """<span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """;
             }
-        } elseif ($e.comments.count > 0 and $e.comments.read_spam_url != "") {
-            if ($p.showspam) {
-                $comments_showspam = """<span class="comments-hidespam"><a href=\"$e.comments.read_spam_url\">$*text_hidespam ($e.comments.spam_counter)</a></span> """;
-            } else {
-                $comments_showspam = """<span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">$*text_showspam ($e.comments.spam_counter)</a></span> """;
-            }
         } else {
             $comments_showspam = "";
         }

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