From 653118b9160cea75301bbb2beb0007de4afb2d7b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 22 Sep 2022 14:29:31 +0800 Subject: [PATCH] * fix bug #27783. --- module/search/control.php | 2 ++ module/search/model.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/module/search/control.php b/module/search/control.php index a6325b3faa..e1faf2e968 100644 --- a/module/search/control.php +++ b/module/search/control.php @@ -236,6 +236,8 @@ class search extends control foreach($typeCount as $objectType => $count) { if(!isset($this->lang->search->modules[$objectType])) continue; + if($this->config->systemMode != 'new' and $objectType == 'program') continue; + if(!empty($this->config->projectMode) and $this->config->projectMode == 'noSprint' and $objectType == 'execution') continue; $typeList[$objectType] = $this->lang->search->modules[$objectType]; } diff --git a/module/search/model.php b/module/search/model.php index 742cf697ea..2a7df2a79d 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -634,6 +634,9 @@ class searchModel extends model } else { + if($this->config->systemMode != 'new') unset($this->config->search->fields->program); + if(!empty($this->config->projectMode) and $this->config->projectMode == 'noSprint') unset($this->config->search->fields->execution); + foreach($this->config->search->fields as $objectType => $fields) { $module = $objectType;