public function cancelRequest($requestId, $token) { $rs = array(); $requestId = intval($requestId); $model = new Model_Request(); $rs = $model->cancelRequest($requestId, $token); return $rs; }
public function action_delete($id = null) { is_null($id) and Response::redirect('request'); if ($request = Model_Request::find($id)) { $request->delete(); Session::set_flash('success', 'Deleted request #' . $id); } else { Session::set_flash('error', 'Could not delete request #' . $id); } Response::redirect('request'); }