diff --git a/module/tree/control.php b/module/tree/control.php index b8a3fca4cd..c826a7df18 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -385,7 +385,7 @@ class tree extends control * @return void */ public function manageChild($rootID, $viewType) - + { if(!empty($_POST)) { $moduleIDList = $this->tree->manageChild($rootID, $viewType); diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php index b228aafd6f..04f5afe740 100644 --- a/module/tree/lang/en.php +++ b/module/tree/lang/en.php @@ -50,7 +50,8 @@ $lang->tree->repeatName = 'The name "%s" exists!'; $lang->tree->shouldNotBlank = 'Module name should not be blank!'; $lang->tree->module = 'Module'; -$lang->tree->name = 'Name'; +$lang->tree->name = 'Module Name'; +$lang->tree->wordName = 'Name'; $lang->tree->line = "{$lang->productCommon} Line"; $lang->tree->cate = 'Category'; $lang->tree->dir = 'Directory'; @@ -71,7 +72,3 @@ $lang->tree->short = 'Abbr.'; $lang->tree->all = 'All Modules'; $lang->tree->executionDoc = "{$lang->executionCommon} Document"; $lang->tree->product = $lang->productCommon; - -$this->lang->module = new stdclass(); -$this->lang->module->name = '名称'; -$this->lang->module->short = '简称'; diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php index bdf4d69fed..c2b90998d9 100644 --- a/module/tree/lang/zh-cn.php +++ b/module/tree/lang/zh-cn.php @@ -51,6 +51,7 @@ $lang->tree->shouldNotBlank = '模块名不能为空格!'; $lang->tree->module = '模块'; $lang->tree->name = '模块名称'; +$lang->tree->wordName = '名称'; $lang->tree->line = "{$lang->productCommon}线名称"; $lang->tree->cate = '分类名称'; $lang->tree->dir = '目录名称'; @@ -71,7 +72,3 @@ $lang->tree->short = '简称'; $lang->tree->all = '所有模块'; $lang->tree->executionDoc = "{$lang->executionCommon}文档"; $lang->tree->product = "所属{$lang->productCommon}"; - -$this->lang->module = new stdclass(); -$this->lang->module->name = '名称'; -$this->lang->module->short = '简称'; diff --git a/module/tree/model.php b/module/tree/model.php index a1908107c9..c96703baa3 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1644,6 +1644,7 @@ class treeModel extends model $data->short = $short; $data->order = $order; + $this->setModuleLang(); $this->dao->update(TABLE_MODULE)->data($data)->autoCheck()->where('id')->eq($moduleID)->limit(1)->exec(); } } @@ -2040,4 +2041,17 @@ class treeModel extends model return $tree; } + + /** + * Load module language. + * + * @access public + * @return void + */ + public function setModuleLang() + { + $this->lang->module = new stdclass(); + $this->lang->module->name = $this->lang->tree->wordName; + $this->lang->module->short = $this->lang->tree->short; + } }