From 352a81ec1325152164193592feecda91556fe615 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Wed, 24 Mar 2021 17:19:46 +0800 Subject: [PATCH] * Adjust session. --- module/index/config.php | 22 ++++++++++++++++++++++ module/index/control.php | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 module/index/config.php diff --git a/module/index/config.php b/module/index/config.php new file mode 100644 index 0000000000..5bad965f91 --- /dev/null +++ b/module/index/config.php @@ -0,0 +1,22 @@ +index->appGroup = array(); +$config->index->appGroup['program'] = 'program'; +$config->index->appGroup['project'] = 'project'; +$config->index->appGroup['risk'] = 'project'; +$config->index->appGroup['issue'] = 'project'; +$config->index->appGroup['task'] = 'execution'; +$config->index->appGroup['build'] = 'execution'; +$config->index->appGroup['execution'] = 'execution'; +$config->index->appGroup['product'] = 'product'; +$config->index->appGroup['release'] = 'product'; +$config->index->appGroup['productplan'] = 'product'; +$config->index->appGroup['story'] = 'product'; +$config->index->appGroup['bug'] = 'qa'; +$config->index->appGroup['testcase'] = 'qa'; +$config->index->appGroup['caselib'] = 'qa'; +$config->index->appGroup['testtask'] = 'qa'; +$config->index->appGroup['testsuite'] = 'qa'; +$config->index->appGroup['testreport'] = 'qa'; +$config->index->appGroup['doc'] = 'doc'; +$config->index->appGroup['todo'] = 'my'; +$config->index->appGroup['effort'] = 'my'; diff --git a/module/index/control.php b/module/index/control.php index dec52b1b2f..9d8983d7c1 100644 --- a/module/index/control.php +++ b/module/index/control.php @@ -79,8 +79,9 @@ class index extends control public function ajaxClearObjectSession() { $objectType = $this->post->objectType; + $appGroup = zget($this->config->index->appGroup, $objectType, ''); if($objectType == 'testcase') $objectType = 'case'; - $this->session->set($objectType . 'List', ''); + $this->session->set($objectType . 'List', '', $appGroup); } }