mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 09:05:49 +00:00
FIX: ID being used to check for children was incorrect
This commit is contained in:
parent
d666e18572
commit
79337bd36e
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user