From 9748984d2ebdf356681be334d73b15844f3d7963 Mon Sep 17 00:00:00 2001 From: Nicolas RAMEL Date: Tue, 19 Aug 2014 12:44:21 +0200 Subject: Stored last seen in the project dashboard --- app/Controller/Board.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app') diff --git a/app/Controller/Board.php b/app/Controller/Board.php index 7fe9c4ae..37a8d118 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -163,6 +163,10 @@ class Board extends Base $this->response->redirect('?controller=project&action=forbidden'); } } + else if (! empty($_SESSION['user']['last_show_project_id']) && isset($projects[$_SESSION['user']['last_show_project_id']])) { + $project_id = $_SESSION['user']['last_show_project_id']; + $project_name = $projects[$_SESSION['user']['last_show_project_id']]; + } else if (! empty($_SESSION['user']['default_project_id']) && isset($projects[$_SESSION['user']['default_project_id']])) { $project_id = $_SESSION['user']['default_project_id']; $project_name = $projects[$_SESSION['user']['default_project_id']]; @@ -184,6 +188,9 @@ class Board extends Base $project_id = $this->request->getIntegerParam('project_id'); $user_id = $this->request->getIntegerParam('user_id', UserModel::EVERYBODY_ID); + // Stored last seen in the project dashboard + $_SESSION['user']['last_show_project_id'] = $project_id ; + $this->checkProjectPermissions($project_id); $projects = $this->project->getAvailableList($this->acl->getUserId()); -- cgit v1.2.3