Савинцев Егор 🚶 (savintsev_egor) wrote in changelog,
Савинцев Егор 🚶
savintsev_egor
changelog

[ljcom] r8255: LJSV-605: LiveJournal locked fix

Committer: esavintcev
LJSV-605: LiveJournal locked fix
U   trunk/bin/upgrading/s2layers/3column/layout.s2
U   trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
U   trunk/bin/upgrading/s2layers/cuteness/layout.s2
Modified: trunk/bin/upgrading/s2layers/3column/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/3column/layout.s2	2010-03-04 08:39:29 UTC (rev 8254)
+++ trunk/bin/upgrading/s2layers/3column/layout.s2	2010-03-04 08:49:29 UTC (rev 8255)
@@ -616,7 +616,9 @@
             """<a href="$link.url" title="$link.caption">$link.caption</a>"""; 
         } else {
             ### showing reply link if comment not screened
+if (not $.entry.comments.locked) {
             $c->print_reply_link({ "linktext" => $*text_comment_reply });
+}
         }
     
     ###<a href="$c.reply_url">$*text_comment_reply</a>$*t_divider;
@@ -829,9 +831,13 @@
 function CommentInfo::print_postlink() {
     var Page p = get_page();
     if ($p.view == "entry") {
+if (not $.locked) {
     $p->print_reply_link({"target" => "topcomment", "img_url" => $*i_leave});
+}
      } else {
+if (not $.locked) {
     print safe """<a href="$.post_url" title="$*t_post_comment"><img src="$*i_leave" border="0" title="$*t_post_comment" alt="$*t_post_comment" /></a> $*t_divider """;
+}
     }
 }
 

Modified: trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2010-03-04 08:39:29 UTC (rev 8254)
+++ trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2010-03-04 08:49:29 UTC (rev 8255)
@@ -752,9 +752,13 @@
             "Maximum Comments Reached";
         } else {
           ###  "<a href=\"$.comments.post_url\">Leave a Comment</a>";
+if (not $.comments.locked) {
           $p->print_reply_link({"target" => "bottomcomment", "linktext" => $*text_post_comment});
+}
         }
+if (not $.comments.locked) {
         " &middot; ";
+}
     }
 
     var int i=0;
@@ -833,9 +837,13 @@
         print safe "$*text_max_comments";
     } else {
         if ($p.view == "entry") {
-                $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment});
+if (not $.locked) {
+           $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment});
+}
         } else {
+if (not $.locked) {
         print safe "<a href=\"$.post_url\">"+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</a>";
+}
        }
     }
 }

Modified: trunk/bin/upgrading/s2layers/cuteness/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/cuteness/layout.s2	2010-03-04 08:39:29 UTC (rev 8254)
+++ trunk/bin/upgrading/s2layers/cuteness/layout.s2	2010-03-04 08:49:29 UTC (rev 8255)
@@ -1188,7 +1188,9 @@
                         print "<div id=\"entrybottom\">\n";
         print "</div>";
         print "<div id=\"footer\" style=\"background: none\">";
+if (not $.entry.comments.locked) {
         $this->print_reply_link({"target" => "bottomcomment", "linktext" => $*text_post_comment});
+}
         $this->print_reply_container({"target" => "bottomcomment"});
 
         
@@ -1380,8 +1382,10 @@
                         print " | ";
                         $e.comments->print();
                 } elseif ( $e.comments.enabled ) {
+if (not $e.comments.locked) {
                         print " | ";
                         $e.comments->print_postlink();
+}
                 }
                 var Link tmp;
                 foreach var string link_key ($e.link_keyseq) {
@@ -1431,7 +1435,9 @@
                 return;
         }
 
+if (not $.locked) {
         $this->print_postlink();
+}
         if ( $.count > 0 or $.screened ) {
                 print " ";
                 print "<b>";
@@ -1535,14 +1541,25 @@
             """<a href="$link.url" title="$link.caption">$link.caption</a>""";
         } else {
             ### showing reply link if comment not screened
+if (not $.entry.comments.locked) {
             $c->print_reply_link({ "linktext" => $*text_comment_reply });
+}
         }
 
                 
                 ###print safe "<a href=\"$c.reply_url\" title=\"$*text_comment_reply\">$*text_comment_reply</a>";
-                if ( $c.parent_url != "" ) { print safe " | <a href=\"$c.parent_url\" title=\"$*text_comment_parent\">$*text_comment_parent</a>"; }
+                if ( $c.parent_url != "" ) {
+if (not $.entry.comments.locked) {
+					print safe " | ";
+}
+					print safe "<a href=\"$c.parent_url\" title=\"$*text_comment_parent\">$*text_comment_parent</a>"; }
                 if ( $c.thread_url != "" ) {
-                     print safe " | <a href=\"$c.thread_url\" title=\"$*text_comment_thread\">$*text_comment_thread</a>";
+if (not $.entry.comments.locked) {
+                     print safe " | ";
+} elseif ($c.parent_url != "" ) {
+					 print safe " | ";
+}
+					print safe"<a href=\"$c.thread_url\" title=\"$*text_comment_thread\">$*text_comment_thread</a>";
                      var Link expand_link = $c->get_link("expand_comments");
                      if (defined $expand_link) {
                         " | " + $c->expand_link({ "title" => $*text_comment_expand }) + " ";

Tags: ljcom, s2, savintsev_egor
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