fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-07-08 07:27 am

[dw-free] comment count incorrect in summary module for disabled comments

[commit: http://hg.dwscoalition.org/dw-free/rev/624a2b7f6639]

http://bugs.dwscoalition.org/show_bug.cgi?id=2757

Properly zero out the number of comments when comments have been disabled,
to match the appearance in entries.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/Entry.pm
--------------------------------------------------------------------------------
diff -r 1fc804842e23 -r 624a2b7f6639 cgi-bin/LJ/Entry.pm
--- a/cgi-bin/LJ/Entry.pm	Thu Jul 08 15:30:23 2010 +0800
+++ b/cgi-bin/LJ/Entry.pm	Thu Jul 08 15:33:21 2010 +0800
@@ -530,7 +530,7 @@ sub comment_info {
         ( $journal->{opt_showtalklinks} eq "Y" && !$self->comments_disabled ) ) ? 1 : 0;
     my $has_screened = ( $self->props->{hasscreened} && $remote && $journal
                          && $remote->can_manage( $journal ) ) ? 1 : 0;
-    my $replycount = $self->reply_count;
+    my $replycount = $comments_enabled ? $self->reply_count : 0;
     my $nc = "";
     $nc .= "nc=$replycount" if $replycount && $remote && $remote->{opt_nctalklinks};
 
--------------------------------------------------------------------------------