* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ $noplugin = true; // flag for ../config/define.php file include_once('../config/define.php'); include_once('../admin/mysql.inc.php'); include_once('../class/class.comment.php'); include_once('../languages/' . U_L . '/lang_comment.' . CHARSET . '.php'); include_once('../languages/' . U_L . '/lang_common.' . CHARSET . '.php'); include_once(override('../comment/display.php')); $arr = array(); securityCheck(); //////////// Check Droits utilisateur //////////// if (!$l21auth->isSuperAdmin()) ReloadIndex('admin'); //////////// isset($_POST['id']) ? $arr['id'] = $_POST['id'] : die('no way !'); isset($_POST['content']) ? $arr['content'] = $_POST['content'] : die('no way !'); isset($_POST['type']) ? $arr['type'] = $_POST['type'] : die('no way !'); $comm = new comment; if(strlen($arr['content']) < 15) { /* Outputting the error messages */ echo '{"status":0,"errors":{"msg":"'. _t('comment', 'error_edit') .'"}}'; } else { /* we modify body comment */ $r = $comm->modify_lite($arr['id'], $arr['content'], $arr['type'], $GLOBALS['sql_object']); if(!$r) echo '{"status":0,"msg": "'. system_error() .'"}'; else echo '{"status":1,"msg": "'. _t('comment', 'successful_edit') .'"}'; die(); } ?>