Don't try to get a comment count for deleted entries.

        Patch by kareila. 

diffs (11 lines):

diff -r bd937c21f12f -r edd7b53e1911 cgi-bin/DW/Controller/CommentCount.pm
--- a/cgi-bin/DW/Controller/CommentCount.pm     Tue Sep 07 18:48:51 2010 +0800
+++ b/cgi-bin/DW/Controller/CommentCount.pm     Tue Sep 07 18:59:06 2010 +0800
@@ -37,6 +37,7 @@ sub commentcount_handler {
         my $ditemid = $args->{ditemid};
         my $uid = LJ::get_userid( $args->{user} );
         $entry = LJ::Entry->new( $uid, ditemid => $ditemid ) if $uid;
+        $entry = undef unless $entry && $entry->valid;
     }
 
     $count = $entry->reply_count if $entry;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to