* Code for app session.

This commit is contained in:
Yagami
2021-03-19 09:31:44 +08:00
parent 5ea5fa3829
commit 7f52574a2f
2 changed files with 9 additions and 10 deletions
+3 -4
View File
@@ -2512,8 +2512,7 @@ class super
}
elseif($this->scope == 'session')
{
//$openApp = $openApp ? $openApp : $this->openApp;
//$openApp ? $_SESSION["app-$openApp"][$key] = $value : $_SESSION[$key] = $value;
if($openApp) $_SESSION["app-$openApp"][$key] = $value;
$_SESSION[$key] = $value;
}
elseif($this->scope == 'env')
@@ -2561,8 +2560,8 @@ class super
}
elseif($this->scope == 'session')
{
//$openApp = $this->openApp;
//if($openApp and isset($_SESSION["app-$openApp"][$key])) return $_SESSION["app-$openApp"][$key];
$openApp = $this->openApp;
if($openApp and isset($_SESSION["app-$openApp"][$key])) return $_SESSION["app-$openApp"][$key];
if(isset($_SESSION[$key])) return $_SESSION[$key];
return false;
}
+6 -6
View File
@@ -348,7 +348,7 @@ class my extends control
public function bug($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. load Lang. */
if($this->app->viewType != 'json') $this->session->set('bugList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('bugList', $this->app->getURI(true), 'qa');
$this->app->loadLang('bug');
/* Load pager. */
@@ -397,7 +397,7 @@ class my extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Save session. */
if($this->app->viewType != 'json') $this->session->set('testtaskList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('testtaskList', $this->app->getURI(true), 'qa');
$this->app->loadLang('testcase');
@@ -433,7 +433,7 @@ class my extends control
public function testcase($type = 'assigntome', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load lang. */
if($this->app->viewType != 'json') $this->session->set('caseList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('caseList', $this->app->getURI(true), 'qa');
$this->loadModel('testcase');
$this->loadModel('testtask');
@@ -478,7 +478,7 @@ class my extends control
public function doc($type = 'openedbyme', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load lang. */
if($this->app->viewType != 'json') $this->session->set('docList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('docList', $this->app->getURI(true), 'doc');
$this->loadModel('doc');
/* Load pager. */
@@ -521,8 +521,8 @@ class my extends control
$this->loadModel('program');
$this->app->loadLang('project');
$this->app->session->set('programList', $this->app->getURI(true));
$this->app->session->set('projectBrowse', $this->app->getURI(true));
$this->app->session->set('programList', $this->app->getURI(true), 'program');
$this->app->session->set('projectBrowse', $this->app->getURI(true), 'project');
/* Set the pager. */
$this->app->loadClass('pager', $static = true);