Exemplo n.º 1
0
 public function cancelRequest($requestId, $token)
 {
     $rs = array();
     $requestId = intval($requestId);
     $model = new Model_Request();
     $rs = $model->cancelRequest($requestId, $token);
     return $rs;
 }
Exemplo n.º 2
0
 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');
 }