0) { $edata = dbarray($eresult); //$ajax_respond = \defender::unserialize($_POST['comment_options']); if ((iADMIN && checkrights("C")) || ($edata['comment_name'] == fusion_get_userdata('user_id') && isset($edata['user_name'])) ) { $child_query = "SELECT comment_id FROM ".DB_COMMENTS." WHERE comment_cat='".intval($_POST['comment_id'])."'"; $result = dbquery($child_query); if (dbrows($result)) { while ($child = dbarray($result)) { dbquery("UPDATE ".DB_COMMENTS." SET comment_cat='".$edata['comment_cat']."' WHERE comment_id='".$child['comment_id']."'"); } } dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_id='".$_POST['comment_id']."'".(iADMIN ? "" : "AND comment_name='".fusion_get_userdata('user_id')."'")); // Refetch the query $ajax_respond = \defender::unserialize($_POST['comment_options']); $ajax_respond['comment_custom_script'] = TRUE; echo PHPFusion\Feedback\Comments::getInstance($ajax_respond, $ajax_respond['comment_key'])->showComments(); } exit; } } } else { $ajax_respond = \defender::unserialize($_POST['comment_options']); $ajax_respond['comment_custom_script'] = TRUE; echo PHPFusion\Feedback\Comments::getInstance($ajax_respond, $ajax_respond['comment_key'])->showComments(); }