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

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

Committer: mchervonniy
LJSUP-8126: number of spam comments
U   trunk/bin/upgrading/s2layers/component/layout.s2
U   trunk/bin/upgrading/s2layers/cuteness/layout.s2
Modified: trunk/bin/upgrading/s2layers/component/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/component/layout.s2	2011-03-16 04:54:31 UTC (rev 10240)
+++ trunk/bin/upgrading/s2layers/component/layout.s2	2011-03-16 04:54:47 UTC (rev 10241)
@@ -2211,18 +2211,18 @@
                             $e.comments->print();
                             $p->print_reply_container({"target" => "topcomment"});
                             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 = """ or """ + 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 = """or <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") {
-                                print safe " or $comments_showspam";
+                                print safe "$comments_showspam";
                             }
                         """</div>
                         </td>

Modified: trunk/bin/upgrading/s2layers/cuteness/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/cuteness/layout.s2	2011-03-16 04:54:31 UTC (rev 10240)
+++ trunk/bin/upgrading/s2layers/cuteness/layout.s2	2011-03-16 04:54:47 UTC (rev 10241)
@@ -1384,18 +1384,18 @@
                 print "<h4>";
                 print safe get_permalink($e.permalink_url);
                     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") {
-                        print safe " | $comments_showspam | ";
+                        print safe "$comments_showspam";
                     }
                 if ( $p.view != "entry" and $p.view != "reply" ) {
                         print " | ";

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