summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-11 13:45:58 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-11 13:45:58 +0200
commit7e84d52115e7f124df255396910b2f633c6cc2c8 (patch)
tree4a4ae484d1691fbdc4ac2e2748a44ff7675a0a14
parentc0ac22b7040cb5774544754d10a03dc67a218059 (diff)
parent9748984d2ebdf356681be334d73b15844f3d7963 (diff)
Merge pull-request #213 (store last seen project)
-rw-r--r--.gitignore1
-rw-r--r--app/Controller/Board.php7
2 files changed, 8 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 8eff52fc..9b1d8e38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,7 @@
.buildpath
.project
/.settings/
+.idea
# OS generated files #
######################
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index 33140f95..d7afb4eb 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -205,6 +205,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']];
@@ -226,6 +230,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());