* Reduction.
This commit is contained in:
@@ -115,12 +115,12 @@ class projectModel extends model
|
||||
*/
|
||||
public function saveState($projectID = 0, $projects = array())
|
||||
{
|
||||
if($projectID > 0) $this->session->set('PRJ', (int)$projectID, $this->app->openApp);
|
||||
if($projectID == 0 and $this->cookie->lastProject) $this->session->set('PRJ', (int)$this->cookie->lastProject, $this->app->openApp);
|
||||
if($projectID == 0 and $this->session->PRJ == '') $this->session->set('PRJ', key($projects), $this->app->openApp);
|
||||
if($projectID > 0) $this->session->set('PRJ', (int)$projectID);
|
||||
if($projectID == 0 and $this->cookie->lastProject) $this->session->set('PRJ', (int)$this->cookie->lastProject);
|
||||
if($projectID == 0 and $this->session->PRJ == '') $this->session->set('PRJ', key($projects));
|
||||
if(!isset($projects[$this->session->PRJ]))
|
||||
{
|
||||
$this->session->set('PRJ', key($projects), $this->app->openApp);
|
||||
$this->session->set('PRJ', key($projects));
|
||||
if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false) $this->accessDenied();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user