diff options
Diffstat (limited to 'controllers/task.php')
| -rw-r--r-- | controllers/task.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/controllers/task.php b/controllers/task.php index bff29f8c..3aa486d5 100644 --- a/controllers/task.php +++ b/controllers/task.php @@ -44,6 +44,8 @@ class Task extends Base { $task = $this->task->getById($this->request->getIntegerParam('task_id'), true); + if (! $task) $this->notfound(); + $this->response->html($this->template->layout('task_show', array( 'task' => $task, 'columns_list' => $this->board->getColumnsList($task['project_id']), @@ -118,6 +120,8 @@ class Task extends Base { $task = $this->task->getById($this->request->getIntegerParam('task_id')); + if (! $task) $this->notfound(); + $this->response->html($this->template->layout('task_edit', array( 'errors' => array(), 'values' => $task, @@ -174,8 +178,12 @@ class Task extends Base // Confirmation dialog before to close a task public function confirmClose() { + $task = $this->task->getById($this->request->getIntegerParam('task_id')); + + if (! $task) $this->notfound(); + $this->response->html($this->template->layout('task_close', array( - 'task' => $this->task->getById($this->request->getIntegerParam('task_id')), + 'task' => $task, 'menu' => 'tasks', 'title' => t('Close a task') ))); @@ -198,8 +206,12 @@ class Task extends Base // Confirmation dialog before to open a task public function confirmOpen() { + $task = $this->task->getById($this->request->getIntegerParam('task_id')); + + if (! $task) $this->notfound(); + $this->response->html($this->template->layout('task_open', array( - 'task' => $this->task->getById($this->request->getIntegerParam('task_id')), + 'task' => $task, 'menu' => 'tasks', 'title' => t('Open a task') ))); |
