diff --git a/comment.php b/comment.php index 8e298d09d..0b406ece6 100644 --- a/comment.php +++ b/comment.php @@ -62,9 +62,9 @@ if(e_AJAX_REQUEST) // TODO improve security } - if(varset($_GET['mode']) == 'delete' && vartrue($_POST['itemid']) && ADMIN) + if(varset($_GET['mode']) == 'delete' && !empty($_POST['id']) && ADMIN) { - $status = e107::getComment()->deleteComment($_POST['itemid']); + $status = e107::getComment()->deleteComment($_POST['id'],$_POST['table'],$_POST['itemid']); $ret['msg'] = ($status) ? 'Ok' : COMLAN_332; $ret['error'] = ($status) ? false : true; echo json_encode($ret); diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php index be169ffcd..ee13f69c5 100644 --- a/e107_core/shortcodes/batch/comment_shortcodes.php +++ b/e107_core/shortcodes/batch/comment_shortcodes.php @@ -194,8 +194,11 @@ class comment_shortcodes extends e_shortcode return; } - // TODO put into a