[dw-free] Expand comment link doesn't appear on comments without replies in S2
[commit: http://hg.dwscoalition.org/dw-free/rev/a7a5cc5b836b]
http://bugs.dwscoalition.org/show_bug.cgi?id=2105
Fix expand links on comments without replies
Patch by
wyntarvox.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2105
Fix expand links on comments without replies
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/s2layers/core2.s2
- cgi-bin/LJ/S2.pm
-------------------------------------------------------------------------------- diff -r 564f51b245ec -r a7a5cc5b836b bin/upgrading/s2layers/core2.s2 --- a/bin/upgrading/s2layers/core2.s2 Thu Nov 19 14:34:59 2009 +0000 +++ b/bin/upgrading/s2layers/core2.s2 Thu Nov 19 14:48:12 2009 +0000 @@ -4247,12 +4247,12 @@ function Comment::print_interaction_link if ($this.parent_url != "") { print safe """<li class="link commentparent"><a href="$this.parent_url">$*text_comment_parent</a></li>\n"""; } if ($this.thread_url != "") { print safe """<li class="link thread"><a href="$this.thread_url">$*text_comment_thread</a></li>\n"""; - var Link expand_link = $this->get_link("expand_comments"); - if (defined $expand_link) { - """<li class="link expand">"""; - $this->print_expand_link(); - """</li>\n"""; - } + } + var Link expand_link = $this->get_link("expand_comments"); + if (defined $expand_link) { + """<li class="link expand">"""; + $this->print_expand_link(); + """</li>\n"""; } """</ul>"""; } @@ -5020,7 +5020,7 @@ function EntryPage::print_comment_partia $c->print_subject(); print safe " - $poster"; var Link expand_link = $c->get_link("expand_comments"); - if ($c.thread_url != "" and defined $expand_link) { + if (defined $expand_link) { " "; $c->print_expand_link(); } $c->print_wrapper_end(); diff -r 564f51b245ec -r a7a5cc5b836b cgi-bin/LJ/S2.pm --- a/cgi-bin/LJ/S2.pm Thu Nov 19 14:34:59 2009 +0000 +++ b/cgi-bin/LJ/S2.pm Thu Nov 19 14:48:12 2009 +0000 @@ -3270,7 +3270,7 @@ sub Comment__expand_link my $title = $opts->{title} ? " title='" . LJ::ehtml($opts->{title}) . "'" : ""; my $class = $opts->{class} ? " class='" . LJ::ehtml($opts->{class}) . "'" : ""; - return "<a href='$this->{thread_url}'$title$class onClick=\"Expander.make(this,'$this->{thread_url}','$this->{talkid}'); return false;\">$text</a>"; + return "<a href='$this->{permalink_url}'$title$class onClick=\"Expander.make(this,'$this->{permalink_url}','$this->{talkid}'); return false;\">$text</a>"; } sub Comment__print_expand_link --------------------------------------------------------------------------------