Index: trunk/extensions/LiquidThreads/classes/Thread.php |
— | — | @@ -292,6 +292,7 @@ |
293 | 293 | |
294 | 294 | if ( $this->replyCount < -1 ) { |
295 | 295 | wfWarn( "Saving thread $id with negative reply count {$this->replyCount} " . wfGetAllCallers() ); |
| 296 | + $this->replyCount = -1; |
296 | 297 | } |
297 | 298 | |
298 | 299 | // Reflect schema changes here. |
— | — | @@ -773,8 +774,10 @@ |
774 | 775 | $count = 0; |
775 | 776 | |
776 | 777 | foreach ( $thread->replies() as $reply ) { |
777 | | - $count++; |
778 | | - $count += self::recursiveGetReplyCount( $reply, $level + 1 ); |
| 778 | + if ( $thread->type != Threads::TYPE_DELETED ) { |
| 779 | + $count++; |
| 780 | + $count += self::recursiveGetReplyCount( $reply, $level + 1 ); |
| 781 | + } |
779 | 782 | } |
780 | 783 | |
781 | 784 | return $count; |