public function dashboardDeleteAction() { if (!wa()->getUser()->isAdmin('webasyst')) { throw new waException('Access denied', 403); } $id = waRequest::post('id', 0, 'int'); if ($id) { $dashboard_model = new waDashboardModel(); $dashboard_model->delete($id); } $this->displayJson(array('result' => 1)); }