FIX: ID being used to check for children was incorrect

This commit is contained in:
Gordon Anderson 2015-02-13 18:36:14 +07:00
parent d666e18572
commit 79337bd36e

View File

@ -136,7 +136,7 @@ class CommentingController extends Controller {
}
if(($comment = $this->getComment()) && $comment->canDelete()) {
$childcount = Comment::get()->filter('ParentCommentID', $this->ID)->count();
$childcount = Comment::get()->filter('ParentCommentID', $comment->ID)->count();
if ($childcount == 0) {
$comment->delete();
} else {