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

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

Committer: mchervonniy
LJSUP-8126: number of spam comments
U   trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2
U   trunk/bin/upgrading/s2layers/gradient/layout.s2
Modified: trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2	2011-03-16 04:54:47 UTC (rev 10241)
+++ trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2	2011-03-16 04:55:43 UTC (rev 10242)
@@ -2120,18 +2120,12 @@
     }
     
     var string comments_showspam = "";
-    if ($.entry.comments.count > 0 and not $.entry.comments.locked) {
+    if ($.entry.comments.count > 0 and $.entry.comments.read_spam_url != "") {
         if ($p.showspam) {
-            $comments_showspam = """<span class="comments-hidespam"><a href=\"$.entry.comments.read_spam_url\">$*text_hidespam ($.entry.comments.spam_counter)</a></span> <span class="emdash">—</span> """;
+            $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """;
         } else {
-            $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url\">$*text_showspam ($.entry.comments.spam_counter)</a></span> <span class="emdash">—</span> """;
+            $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url\">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """;
         }
-    } elseif ($.entry.comments.count > 0) {
-        if ($p.showspam) {
-            $comments_showspam = """<span class="comments-hidespam"><a href=\"$.entry.comments.read_spam_url\">$*text_hidespam ($.entry.comments.spam_counter)</a></span> """;
-        } else {
-            $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url\">$*text_showspam ($.entry.comments.spam_counter)</a></span> """;
-        }
     } else {
         $comments_showspam = "";
     }

Modified: trunk/bin/upgrading/s2layers/gradient/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/gradient/layout.s2	2011-03-16 04:54:47 UTC (rev 10241)
+++ trunk/bin/upgrading/s2layers/gradient/layout.s2	2011-03-16 04:55:43 UTC (rev 10242)
@@ -1486,14 +1486,14 @@
    }
 
    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\">$*text_hidespam ($e.comments.spam_counter)</a></span> """;
+         $comments_showspam = get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> $*comment_link_divider """;
       } else {
-         $comments_showspam = """<a href=\"$e.comments.read_spam_url\">$*text_showspam ($e.comments.spam_counter)</a></span> """;
+         $comments_showspam = """<a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> $*comment_link_divider """;
       }
    }
-   if ($p.view == "entry") {print safe "$comments_showspam $*comment_link_divider ";}
+   if ($p.view == "entry") {print safe "$comments_showspam";}
 
    $e.comments->print();
    """</div>""";

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