1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Infopanel comment-approval now fully functional.

This commit is contained in:
Cameron
2013-05-20 13:37:39 -07:00
parent 5034dc0e49
commit de808f74d5
4 changed files with 67 additions and 24 deletions

View File

@@ -62,16 +62,16 @@ if(e_AJAX_REQUEST) // TODO improve security
}
if(varset($_GET['mode']) == 'delete' && vartrue($_POST['itemid']))
if(varset($_GET['mode']) == 'delete' && vartrue($_POST['itemid']) && ADMIN)
{
$status = e107::getComment()->deleteComment($_POST['itemid']);
$ret['msg'] = COMLAN_332;
$ret['msg'] = ($status) ? 'Ok' : COMLAN_332;
$ret['error'] = ($status) ? false : true;
echo json_encode($ret);
exit;
}
if(varset($_GET['mode']) == 'approve' && vartrue($_POST['itemid']))
if(varset($_GET['mode']) == 'approve' && vartrue($_POST['itemid']) && ADMIN)
{
$status = e107::getComment()->approveComment($_POST['itemid']);
$ret['msg'] = ($status) ? COMLAN_333 : COMLAN_334;