function Delete() { // Check the token if (!Kit::CheckToken()) { trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); } $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $categoryID = Kit::GetParam('categoryid', _POST, _INT); // Remove the category $resObject = new Category($db); if (!$resObject->Delete($categoryID)) { trigger_error($resObject->GetErrorMessage(), E_USER_ERROR); } $response->SetFormSubmitResponse('Category deleted'); $response->Respond(); }