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

[dw-free] Comment hierarchy indicators count screened comments

[commit: http://hg.dwscoalition.org/dw-free/rev/70098be85f90]

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

Don't count comments whose presence isn't visible on the page in the
hierarchy.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/Talk.pm
--------------------------------------------------------------------------------
diff -r 0bf25921a21f -r 70098be85f90 cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm	Fri Nov 11 11:41:42 2011 +0800
+++ b/cgi-bin/LJ/Talk.pm	Fri Nov 11 15:44:56 2011 +0800
@@ -1078,6 +1078,8 @@
             my $top_counter = 1;
 
             foreach my $post (sort { $a->{'talkid'} <=> $b->{'talkid'} } values %$posts) {
+                next unless $post->{_show} || $post->{showable_children};
+
                 # set the echi for this comment
                 my $parentid = $post->{'parenttalkid'} || $post->{'parenttalkid_actual'} || 0;
                 if ( $parentid && $posts->{$parentid} ) {
--------------------------------------------------------------------------------