summaryrefslogtreecommitdiff
path: root/controllers/board.php
diff options
context:
space:
mode:
authorFrédéric Guillot <contact@fredericguillot.com>2014-02-24 19:07:25 -0500
committerFrédéric Guillot <contact@fredericguillot.com>2014-02-24 19:07:25 -0500
commit565290fbf9e3727655921a969550167aa59a6e24 (patch)
tree0c3a98b1152e90eff86da26d9d9c8ec803dfdf95 /controllers/board.php
parent8159cc99a64cfe563dccea6821348764fc40fb85 (diff)
Display a page not found when the data is not in the dabase anymore
Diffstat (limited to 'controllers/board.php')
-rw-r--r--controllers/board.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/controllers/board.php b/controllers/board.php
index 832ab60f..29633a14 100644
--- a/controllers/board.php
+++ b/controllers/board.php
@@ -11,6 +11,8 @@ class Board extends Base
$project = $this->project->get($task['project_id']);
$projects = $this->project->getListByStatus(\Model\Project::ACTIVE);
+ if (! $project) $this->notfound();
+
$this->response->html($this->template->layout('board_assign', array(
'errors' => array(),
'values' => $task,
@@ -92,6 +94,9 @@ class Board extends Base
{
$projects = $this->project->getListByStatus(\Model\Project::ACTIVE);
$project_id = $this->request->getIntegerParam('project_id');
+
+ if (! isset($projects[$project_id])) $this->notfound();
+
$project_name = $projects[$project_id];
$this->response->html($this->template->layout('board_index', array(
@@ -111,6 +116,9 @@ class Board extends Base
$project_id = $this->request->getIntegerParam('project_id');
$project = $this->project->get($project_id);
+
+ if (! $project) $this->notfound();
+
$columns = $this->board->getColumnsList($project_id);
$values = array();
@@ -135,6 +143,9 @@ class Board extends Base
$project_id = $this->request->getIntegerParam('project_id');
$project = $this->project->get($project_id);
+
+ if (! $project) $this->notfound();
+
$columns = $this->board->getColumnsList($project_id);
$data = $this->request->getValues();
$values = array();
@@ -173,6 +184,9 @@ class Board extends Base
$project_id = $this->request->getIntegerParam('project_id');
$project = $this->project->get($project_id);
+
+ if (! $project) $this->notfound();
+
$columns = $this->board->getColumnsList($project_id);
$data = $this->request->getValues();
$values = array();