summaryrefslogtreecommitdiff
path: root/app/Controller/Board.php
diff options
context:
space:
mode:
authorNicolas RAMEL <nramel@r-numerique.fr>2014-08-19 12:44:21 +0200
committerNicolas RAMEL <nramel@r-numerique.fr>2014-08-19 12:44:21 +0200
commit9748984d2ebdf356681be334d73b15844f3d7963 (patch)
treed1e2e6bd649b529289fc97c5749a911c27c08834 /app/Controller/Board.php
parent287a81506562f7353fb6e62d3287068b515be88a (diff)
Stored last seen in the project dashboard
Diffstat (limited to 'app/Controller/Board.php')
-rw-r--r--app/Controller/Board.php7
1 files changed, 7 insertions, 0 deletions
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());