diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-04 21:38:53 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-04 21:38:53 -0500 |
commit | 0f2b46dd6a9a1dc17768de2c415f382df95142e8 (patch) | |
tree | 55191fce45c7c06b7d2b45834ea4151745c3db77 /app/Controller/Base.php | |
parent | 346151e103431e8de12520b26daae10676b8faf5 (diff) |
Do not refresh the whole page when changing subtask status (work in progress)
Diffstat (limited to 'app/Controller/Base.php')
-rw-r--r-- | app/Controller/Base.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php index a80b3528..c55ad9ad 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -214,8 +214,7 @@ abstract class Base extends \Kanboard\Core\Base $project = $this->project->getByIdWithOwner($project_id); if (empty($project)) { - $this->flash->failure(t('Project not found.')); - $this->response->redirect($this->helper->url->to('project', 'index')); + $this->notfound(); } return $project; @@ -243,6 +242,23 @@ abstract class Base extends \Kanboard\Core\Base } /** + * Get the current subtask + * + * @access protected + * @return array + */ + protected function getSubtask() + { + $subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id')); + + if (empty($subtask)) { + $this->notfound(); + } + + return $subtask; + } + + /** * Common method to get project filters * * @access protected |