/** * Deletes a Group * @return */ function Delete() { // Check the token if (!Kit::CheckToken()) { trigger_error('Token does not match', E_USER_ERROR); } $db =& $this->db; $response = new ResponseManager(); $displayGroupID = Kit::GetParam('DisplayGroupID', _POST, _INT); // Auth $auth = $this->user->DisplayGroupAuth($displayGroupID, true); if (!$auth->del) { trigger_error(__('You do not have permission to edit this display group'), E_USER_ERROR); } // Deal with the Delete $displayGroupObject = new DisplayGroup($db); if (!$displayGroupObject->Delete($displayGroupID)) { trigger_error($displayGroupObject->GetErrorMessage(), E_USER_ERROR); } $response->SetFormSubmitResponse(__('Display Group Deleted'), false); $response->Respond(); }