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

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

Committer: mchervonniy
LJSUP-8126: number of spam comments
U   trunk/bin/upgrading/s2layers/classic/layout.s2
U   trunk/bin/upgrading/s2layers/cleansimple/layout.s2
Modified: trunk/bin/upgrading/s2layers/classic/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/classic/layout.s2	2011-03-16 03:34:25 UTC (rev 18561)
+++ trunk/bin/upgrading/s2layers/classic/layout.s2	2011-03-16 04:21:09 UTC (rev 18562)
@@ -745,9 +745,9 @@
 function CommentInfo::print_spamlink() {
     var Page p = get_page();
     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>";
     }
 }
 
@@ -768,7 +768,7 @@
         if ($.show_postlink) {
             $this->print_postlink();
         }
-        if ($p.view == "entry") {
+        if ($p.view == "entry" and $.read_spam_url != "") {
             print safe "$*text_btwn_comments";
             $this->print_spamlink();
         }

Modified: trunk/bin/upgrading/s2layers/cleansimple/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/cleansimple/layout.s2	2011-03-16 03:34:25 UTC (rev 18561)
+++ trunk/bin/upgrading/s2layers/cleansimple/layout.s2	2011-03-16 04:21:09 UTC (rev 18562)
@@ -852,18 +852,18 @@
 
 
     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>""";
+            $comments_showspam = """ | """ + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments");
         } else {
-            $comments_showspam = """<a href="$e.comments.read_spam_url">$*text_showspam ($e.comments.spam_counter)</a>""";
+            $comments_showspam = """ | <a href="$e.comments.read_spam_url">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a>""";
         }
     } else {
         $comments_showspam = "";
     }
 
     if ($p.view == "entry") {
-        $*opt_text_right_comments = " | $comments_showspam";
+        $*opt_text_right_comments = "$comments_showspam";
     }
 
     $e.comments->print(); "\n";

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