From 6bdc25490f02649242b1d96025f8da1f4c41884b Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 4 May 2016 21:51:38 -0400 Subject: Unify task drop-down menu between different views --- app/Controller/BoardPopover.php | 4 ++-- app/Controller/Task.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Controller') diff --git a/app/Controller/BoardPopover.php b/app/Controller/BoardPopover.php index 63dab302..10584137 100644 --- a/app/Controller/BoardPopover.php +++ b/app/Controller/BoardPopover.php @@ -44,7 +44,7 @@ class BoardPopover extends Base $this->flash->failure(t('Unable to update your task.')); } - $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $values['project_id']))); + $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $values['project_id'])), true); } /** @@ -81,7 +81,7 @@ class BoardPopover extends Base $this->flash->failure(t('Unable to update your task.')); } - $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $values['project_id']))); + $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $values['project_id'])), true); } /** diff --git a/app/Controller/Task.php b/app/Controller/Task.php index 902a32d6..072df87b 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -151,7 +151,7 @@ class Task extends Base { $task = $this->getTask(); - if (! $this->taskPermission->canRemoveTask($task)) { + if (! $this->helper->user->canRemoveTask($task)) { $this->forbidden(); } @@ -164,7 +164,7 @@ class Task extends Base $this->flash->failure(t('Unable to remove this task.')); } - $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id']))); + $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id'])), true); } $this->response->html($this->template->render('task/remove', array( -- cgit v1.2.3