From e88b8e616086f18314e8811e79e6159d675c1fee Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 21 Feb 2023 08:48:09 +0800 Subject: [PATCH] * adjust code. --- module/dev/control.php | 3 ++- module/dev/model.php | 36 +----------------------------------- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/module/dev/control.php b/module/dev/control.php index 6811636eed..a8825cb380 100644 --- a/module/dev/control.php +++ b/module/dev/control.php @@ -95,8 +95,9 @@ class dev extends control public function langItem($type = 'common', $module = '', $method = '', $language = 'zh_cn') { $language = str_replace('_', '-', $language); + if($type == 'second' and empty($module)) $module = 'my'; $moduleName = $module; - if($type == 'common') $moduleName = 'common'; + if($type == 'common' or $type == 'first') $moduleName = 'common'; if($type == 'second') $moduleName = $module . 'Menu'; if($type == 'third') $moduleName = $module . 'SubMenu'; diff --git a/module/dev/model.php b/module/dev/model.php index 22b8611187..49c8debf7d 100644 --- a/module/dev/model.php +++ b/module/dev/model.php @@ -304,23 +304,6 @@ class devModel extends model */ public function getOriginalLang($type, $module = '', $method = '', $language = 'zh-cn') { - // Defalut value set, remove when left tree display. - if($type == 'feature') - { - $module = 'product'; - $method = 'browse'; - } - elseif($type == 'second') - { - $module = 'scrum'; - } - elseif($type == 'third') - { - $module = 'kanbanProject'; - $method = 'settings'; - } - // Defalut value set end. - $originalLangs = array(); $clientLang = $this->app->getClientLang(); $defaultLang = $this->loadDefaultLang(); @@ -427,23 +410,6 @@ class devModel extends model $customedLangs = array(); $clientLang = $this->app->getClientLang(); - // Defalut value set, remove when left tree display. - if($type == 'feature') - { - $module = 'product'; - $method = 'browse'; - } - elseif($type == 'second') - { - $module = 'scrum'; - } - elseif($type == 'third') - { - $module = 'kanbanProject'; - $method = 'settings'; - } - // Defalut value set end. - $langKey = ''; $customeds = array(); if($type == 'common') @@ -473,7 +439,7 @@ class devModel extends model } elseif($type == 'second') { - $customeds = $this->loadModel('custom')->getItems("lang={$clientLang}&module={$module}Menu§ion=&vision={$this->config->vision}"); + $customeds = $this->loadModel('custom')->getItems("lang={$clientLang}&module={$module}Menu&vision={$this->config->vision}"); } elseif($type == 'third') {