diff options
Diffstat (limited to 'app/Controller/TaskViewController.php')
-rw-r--r-- | app/Controller/TaskViewController.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/app/Controller/TaskViewController.php b/app/Controller/TaskViewController.php index 6d3cc5c5..b16c15de 100644 --- a/app/Controller/TaskViewController.php +++ b/app/Controller/TaskViewController.php @@ -143,34 +143,4 @@ class TaskViewController extends BaseController 'transitions' => $this->transition->getAllByTask($task['id']), ))); } - - /** - * Remove a task - * - * @access public - */ - public function remove() - { - $task = $this->getTask(); - - if (! $this->helper->user->canRemoveTask($task)) { - throw new AccessForbiddenException(); - } - - if ($this->request->getStringParam('confirmation') === 'yes') { - $this->checkCSRFParam(); - - if ($this->task->remove($task['id'])) { - $this->flash->success(t('Task removed successfully.')); - } else { - $this->flash->failure(t('Unable to remove this task.')); - } - - return $this->response->redirect($this->helper->url->to('BoardViewController', 'show', array('project_id' => $task['project_id'])), true); - } - - return $this->response->html($this->template->render('task/remove', array( - 'task' => $task, - ))); - } } |