* Add the language item of the project.

This commit is contained in:
tianshujie98
2021-07-08 14:31:03 +08:00
parent 7be1de8381
commit 4c3af55bbb
3 changed files with 17 additions and 4 deletions
+9 -2
View File
@@ -205,10 +205,17 @@ class router extends baseRouter
if($hourKey == STORYPOINT_KEY) $config->hourUnit = 'sp';
if($hourKey == FUNCTIONPOINT_KEY) $config->hourUnit = 'fp';
$iterationKey = $projectKey;
$iterationKey = $projectKey;
$productProject = $this->dbh->query('SELECT value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' AND `key`='productProject'")->fetch();
if($productProject)
{
$productProject = $productProject->value;
list($productCommon, $projectCommon) = explode('_', $productProject);
}
/* Set productCommon, projectCommon and hourCommon. Default english lang. */
$lang->productCommon = $this->config->productCommonList[$this->clientLang][PRODUCT_KEY];
$lang->productCommon = isset($this->config->productCommonList[$this->clientLang][(int)$productCommon]) ? $this->config->productCommonList[$this->clientLang][(int)$productCommon] : $this->config->productCommonList['en'][0];
$lang->projectCommon = isset($this->config->projectCommonList[$this->clientLang][(int)$projectCommon]) ? $this->config->projectCommonList[$this->clientLang][(int)$projectCommon] : $this->config->projectCommonList['en'][0];
$lang->iterationCommon = isset($this->config->executionCommonList[$this->clientLang][(int)$iterationKey]) ? $this->config->executionCommonList[$this->clientLang][(int)$iterationKey] : $this->config->executionCommonList['en'][(int)$iterationKey];
$lang->executionCommon = isset($this->config->executionCommonList[$this->clientLang][(int)$projectKey]) ? $this->config->executionCommonList[$this->clientLang][(int)$projectKey] : $this->config->executionCommonList['en'][(int)$projectKey];
$lang->hourCommon = isset($this->config->hourPointCommonList[$this->clientLang][(int)$hourKey]) ? $this->config->hourPointCommonList[$this->clientLang][(int)$hourKey] : $this->config->hourPointCommonList['en'][(int)$hourKey];