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

[livejournal] r18943: LJSUP-8605: reply link was removed from ...

Committer: mchervonniy
LJSUP-8605: reply link was removed from spammed comment
U   trunk/bin/upgrading/s2layers/generator/layout.s2
Modified: trunk/bin/upgrading/s2layers/generator/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/generator/layout.s2	2011-04-21 09:09:25 UTC (rev 18942)
+++ trunk/bin/upgrading/s2layers/generator/layout.s2	2011-04-21 09:32:13 UTC (rev 18943)
@@ -1350,6 +1350,7 @@
     $c->print_expand_collapse_links();
 }
 function EntryPage::print_comment_full (Comment c) {
+    var Page p = get_page();
     var Color background; var Color color;
     if ($c.screened) {
         $background = $*comment_bar_screened_bgcolor;
@@ -1413,28 +1414,30 @@
     print "<div style='margin-left: 5px'>"; $c->print_text(); "</div>";
     print "<div style='margin-top: 3px; font-size: smaller'>";
 
-    "<span class='commentlinks'>";
-    if ($c.frozen) {
-        "(Replies frozen) ";
-    } else {
-        "("; 
-        ###$c->print_reply_link({"linktext" => "Reply to this"}); 
-        if($c.screened == true) {
-            ### if comment screened - show link for unscreen
-            var Link link;
-            $link = $c->get_link("unscreen_to_reply");
-            """<a href="$link.url" title="$link.caption">$link.caption</a>""";
-        } else {
-            ### showing reply link if comment not screened
-            $c->print_reply_link({ "linktext" => $*text_comment_reply });
-        }
+    if ((not $c.spam) or ($p.showspam)) {
+	    "<span class='commentlinks'>";
+	    if ($c.frozen) {
+		"(Replies frozen) ";
+	    } else {
+		"("; 
+		###$c->print_reply_link({"linktext" => "Reply to this"}); 
+		if($c.screened == true) {
+		    ### if comment screened - show link for unscreen
+		    var Link link;
+		    $link = $c->get_link("unscreen_to_reply");
+		    """<a href="$link.url" title="$link.caption">$link.caption</a>""";
+		} else {
+		    ### showing reply link if comment not screened
+		    $c->print_reply_link({ "linktext" => $*text_comment_reply });
+		}
 
-        ") ";
+		") ";
+	    }
+	    "</span>";
     }
-    "</span>";
 
     if ($c.parent_url != "") { "(<a href='$c.parent_url'>Parent</a>) "; }
-    if ($c.thread_url != "") {
+    if ($c.thread_url != "" and (not $c.spam)) {
         "(<a href='$c.thread_url'>Thread</a>) ";
         $c->print_expand_collapse_links();
     }

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