From 2cb6de6666e43c5e88eb1943756f3cb5b8ef7d90 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 22 Dec 2016 10:00:37 -0800 Subject: [PATCH] New Events: user_page_item_viewed, user_comment_deleted News Comment Count now moving up/down accordingly. --- comment.php | 4 ++-- .../shortcodes/batch/comment_shortcodes.php | 7 ++++-- e107_handlers/comment_class.php | 23 ++++++++++++++---- e107_plugins/news/e_event.php | 24 +++++++++++++++++-- e107_web/js/core/front.jquery.js | 4 +++- page.php | 5 +++- 6 files changed, 55 insertions(+), 12 deletions(-) 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