From edf7d6448bed976b81509a11223ba6aabbbb1d65 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Mon, 27 Jul 2020 03:29:59 -0700 Subject: [PATCH] * Fix bug,task#7549. --- module/bug/control.php | 4 ++-- module/product/control.php | 2 +- module/project/control.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 77870ac5cb..5406ea29e2 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -93,6 +93,7 @@ class bug extends control if($browseType == '') setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false); } if($browseType == 'bybranch') setcookie('bugBranch', (int)$branch, 0, $this->config->webRoot, '', false, false); + if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('bugBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->bugModule ? $this->cookie->bugModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; @@ -112,8 +113,7 @@ class bug extends control { $moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'), '', (int)$this->cookie->treeBranch); } - if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('bugBrowseType', $browseType); - if($browseType == 'bymodule' or $browseType == 'bybranch') $this->session->set('bugBrowseType', 'unclosed'); + if($browseType == 'bymodule' and $this->session->bugBrowseType == 'bysearch') $this->session->set('bugBrowseType', 'unclosed'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->qaBugOrder ? $this->cookie->qaBugOrder : 'id_desc'; diff --git a/module/product/control.php b/module/product/control.php index e382004ef7..4dfe862056 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -154,7 +154,7 @@ class product extends control } if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType); - if($browseType == 'bymodule' or $browseType == 'bybranch') $this->session->set('storyBrowseType', 'unclosed'); + if(($browseType == 'bymodule' or $browseType == 'bybranch') and $this->session->storyBrowseType == 'bysearch') $this->session->set('storyBrowseType', 'unclosed'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->productStoryOrder ? $this->cookie->productStoryOrder : 'id_desc'; diff --git a/module/project/control.php b/module/project/control.php index 01da0e555c..6631a89c6e 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -149,7 +149,7 @@ class project extends control $this->session->set('taskBrowseType', $browseType); } - if($browseType == 'bymodule') $this->session->set('taskBrowseType', 'unclosed'); + if($browseType == 'bymodule' and $this->session->taskBrowseType == 'bysearch') $this->session->set('taskBrowseType', 'unclosed'); /* Set queryID, moduleID and productID. */ $queryID = ($browseType == 'bysearch') ? (int)$param : 0;