From dc40675f3725646438b81134a15ac3c929424a2b Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 12 Dec 2015 16:52:12 -0500 Subject: Fix regression for subtask restriction --- app/Helper/Subtask.php | 2 +- app/Subscriber/AuthSubscriber.php | 2 -- app/Subscriber/BootstrapSubscriber.php | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/Helper/Subtask.php b/app/Helper/Subtask.php index 7d474de0..90bd733e 100644 --- a/app/Helper/Subtask.php +++ b/app/Helper/Subtask.php @@ -25,7 +25,7 @@ class Subtask extends \Kanboard\Core\Base return trim($this->template->render('subtask/icons', array('subtask' => $subtask))) . $this->helper->e($subtask['title']); } - if ($subtask['status'] == 0 && isset($this->sessionStorage->hasSubtaskInProgress) && $this->sessionStorage->hasSubtaskInProgress === true) { + if ($subtask['status'] == 0 && isset($this->sessionStorage->hasSubtaskInProgress) && $this->sessionStorage->hasSubtaskInProgress) { return $this->helper->url->link( trim($this->template->render('subtask/icons', array('subtask' => $subtask))) . $this->helper->e($subtask['title']), 'subtask', diff --git a/app/Subscriber/AuthSubscriber.php b/app/Subscriber/AuthSubscriber.php index efda9663..f834afec 100644 --- a/app/Subscriber/AuthSubscriber.php +++ b/app/Subscriber/AuthSubscriber.php @@ -57,8 +57,6 @@ class AuthSubscriber extends Base implements EventSubscriberInterface $this->userSession->validatePostAuthentication(); } - $this->sessionStorage->hasSubtaskInProgress = $this->subtask->hasSubtaskInProgress($this->userSession->getId()); - if (isset($this->sessionStorage->hasRememberMe) && $this->sessionStorage->hasRememberMe) { $session = $this->rememberMeSession->create($this->userSession->getId(), $ipAddress, $userAgent); $this->rememberMeCookie->write($session['token'], $session['sequence'], $session['expiration']); diff --git a/app/Subscriber/BootstrapSubscriber.php b/app/Subscriber/BootstrapSubscriber.php index ed51a3e1..e399f688 100644 --- a/app/Subscriber/BootstrapSubscriber.php +++ b/app/Subscriber/BootstrapSubscriber.php @@ -17,6 +17,7 @@ class BootstrapSubscriber extends \Kanboard\Core\Base implements EventSubscriber { $this->config->setupTranslations(); $this->config->setupTimezone(); + $this->sessionStorage->hasSubtaskInProgress = $this->subtask->hasSubtaskInProgress($this->userSession->getId()); } public function __destruct() -- cgit v1.2.3