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

[livejournal] r18569: LJSUP-8126: number of spam comments

Committer: mchervonniy
LJSUP-8126: number of spam comments
U   trunk/bin/upgrading/s2layers/haven/layout.s2
U   trunk/bin/upgrading/s2layers/lickable/layout.s2
U   trunk/bin/upgrading/s2layers/magazine/layout.s2
U   trunk/bin/upgrading/s2layers/notepad/layout.s2
Modified: trunk/bin/upgrading/s2layers/haven/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/haven/layout.s2	2011-03-16 05:02:49 UTC (rev 18568)
+++ trunk/bin/upgrading/s2layers/haven/layout.s2	2011-03-16 05:17:55 UTC (rev 18569)
@@ -1215,11 +1215,11 @@
         println " ";
     }
     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> """;
         } 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> """;
         }
     }
     if ($p.view == "entry") {print safe "$comments_showspam | ";}

Modified: trunk/bin/upgrading/s2layers/lickable/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/lickable/layout.s2	2011-03-16 05:02:49 UTC (rev 18568)
+++ trunk/bin/upgrading/s2layers/lickable/layout.s2	2011-03-16 05:17:55 UTC (rev 18569)
@@ -1116,14 +1116,14 @@
             "<li>"; $.comments->print_postlink(); "</li>";
         }
         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></span> """;
+                $comments_showspam = """<li>""" + get_plural_phrase($.comments.spam_counter, "text_read_spam_comments") + """</li>""";
             } else {
-                $comments_showspam = """<a href=\"$.comments.read_spam_url\">$*text_showspam ($.comments.spam_counter)</a></span> """;
+                $comments_showspam = """<li><a href=\"$.comments.read_spam_url\">""" + get_plural_phrase($.comments.spam_counter, "text_read_all_spam_comments") + """</a></li>""";
             }
         }
-        if ($p.view == "entry") {print safe "<li>$comments_showspam</li>";}
+        if ($p.view == "entry") {print safe "$comments_showspam";}
         println """</ul>""";
      ### $p->print_reply_container({"target" => "topcomment"});
     }

Modified: trunk/bin/upgrading/s2layers/magazine/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/magazine/layout.s2	2011-03-16 05:02:49 UTC (rev 18568)
+++ trunk/bin/upgrading/s2layers/magazine/layout.s2	2011-03-16 05:17:55 UTC (rev 18569)
@@ -660,16 +660,16 @@
         print safe "<div class='Comment'>$*text_left_comments";
         if ($.show_readlink) {
             $this->print_readlink();
-            if ($p.view == "entry") {
+            if ($p.view == "entry" and $.read_spam_url != "") {
                 if (clean_url($*img_btwn_comments) != "") {
                     """ <img src="$*img_btwn_comments" alt="" /> """;
                 } else {
                     print safe "$*text_btwn_comments";
                 }
                 if ($p.showspam) {
-                    print safe """<a href=\"$.read_spam_url\">$*text_hidespam ($.spam_counter)</a>""";
+                    print safe get_plural_phrase($.spam_counter, "text_read_spam_comments");
                 } else {
-                    print safe """<a href=\"$.read_spam_url\">$*text_showspam ($.spam_counter)</a>""";
+                    print safe """<a href=\"$.read_spam_url\">""" + get_plural_phrase($.spam_counter, "text_read_all_spam_comments") + """</a>""";
                 }
             }
         }

Modified: trunk/bin/upgrading/s2layers/notepad/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/notepad/layout.s2	2011-03-16 05:02:49 UTC (rev 18568)
+++ trunk/bin/upgrading/s2layers/notepad/layout.s2	2011-03-16 05:17:55 UTC (rev 18569)
@@ -602,16 +602,16 @@
         print safe "$*text_left_comments";
         if ($.show_readlink) {
             $this->print_readlink();
-            if ($p.view == "entry") {
+            if ($p.view == "entry" and $.read_spam_url != "") {
                 if (clean_url($*img_btwn_comments) != "") {
                     """ <img src="$*img_btwn_comments" alt="" /> """;
                 } else {
                     print safe "$*text_btwn_comments";
                 }
                 if ($p.showspam) {
-                     print safe """<a href=\"$.read_spam_url\">$*text_hidespam ($.spam_counter)</a>""";
+                     print safe get_plural_phrase($.spam_counter, "text_read_spam_comments");
                 } else {
-                     print safe """<a href=\"$.read_spam_url\">$*text_showspam ($.spam_counter)</a>""";
+                     print safe """<a href=\"$.read_spam_url\">""" + get_plural_phrase($.spam_counter, "text_read_all_spam_comments") + """</a>""";
                 }
             }
         }

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