예제 #1
0
 public function deleteAjaxActionAuth(Param\AjaxString $id = null, Param\AjaxString $module = null)
 {
     if (is_null($id) || is_null($module)) {
         $this->ajax->setResponse('success', false);
         die;
     }
     if (\Difra\Plugins\Comments\Comment::checkDeleteRights($id->val(), $module->val())) {
         \Difra\Plugins\Comments\Comment::delete($id->val(), $module->val());
         $this->ajax->setResponse('success', true);
         return;
     }
     $this->ajax->setResponse('success', false);
 }
예제 #2
0
 public function deleteAjaxAction(Param\AnyString $module, Param\AnyInt $commentId)
 {
     \Difra\Plugins\Comments\Comment::delete($commentId->val(), $module->val());
     $this->ajax->refresh();
 }