From e4909221b4310bdd64b248b19bd86b428c9b28cd Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 11 May 2020 09:49:57 +0800 Subject: [PATCH] * finish task #7164. --- framework/router.class.php | 14 +++++++------- module/story/model.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index b5542be763..e5e15d7bd1 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -106,7 +106,7 @@ class router extends baseRouter $commonSettings = array(); try { - $commonSettings = $this->dbh->query('SELECT `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' and `key` in ('productProject','urAndSr','urSrName','storyRequirement','hourPoint')")->fetchAll(); + $commonSettings = $this->dbh->query('SELECT `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' and `key` in ('productProject','URAndSR','URSRName','storyRequirement','hourPoint')")->fetchAll(); } catch (PDOException $exception) { @@ -134,16 +134,16 @@ class router extends baseRouter if($setting->key == 'productProject') list($productCommon, $projectCommon) = explode('_', $setting->value); if($setting->key == 'storyRequirement') $storyCommon = $setting->value; if($setting->key == 'hourPoint') $hourCommon = $setting->value; - if($setting->key == 'urAndSr') $config->urAndSr = $setting->value; - if($setting->key == 'urSrName') + if($setting->key == 'URAndSR') $config->URAndSR = $setting->value; + if($setting->key == 'URSRName') { - $urSrName = json_decode($setting->value, true); - if(isset($urSrName['urCommon'][$this->clientLang])) $config->urCommon = $urSrName['urCommon'][$this->clientLang]; - if(isset($urSrName['srCommon'][$this->clientLang])) $config->srCommon = $urSrName['srCommon'][$this->clientLang]; + $URSRName = json_decode($setting->value, true); + if(isset($URSRName['urCommon'][$this->clientLang])) $config->urCommon = $URSRName['urCommon'][$this->clientLang]; + if(isset($URSRName['srCommon'][$this->clientLang])) $config->srCommon = $URSRName['srCommon'][$this->clientLang]; } } - if(!empty($config->urAndSr)) $storyCommon = 0; + if(!empty($config->URAndSR)) $storyCommon = 0; $config->storyCommon = $storyCommon; /* Set productCommon, projectCommon, storyCommon and hourCommon. Default english lang. */ diff --git a/module/story/model.php b/module/story/model.php index afb95cad56..46d41ed85f 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2658,7 +2658,7 @@ class storyModel extends model ->fetchPairs('id', 'title'); /* For requirement children. */ - if($type == 'requirement' && !empty($this->config->urAndSr)) + if($type == 'requirement' && !empty($this->config->URAndSR)) { $relations = $this->dao->select('DISTINCT AID, BID')->from(TABLE_RELATION) ->where('AID')->in(array_keys($stories))