diff --git a/module/tree/control.php b/module/tree/control.php
index 4f0077e652..b8a3fca4cd 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -385,10 +385,11 @@ class tree extends control
* @return void
*/
public function manageChild($rootID, $viewType)
- {
+
if(!empty($_POST))
{
$moduleIDList = $this->tree->manageChild($rootID, $viewType);
+ if(dao::isError()) return print(js::error(dao::getError()));
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $moduleIDList));
if(($viewType == 'doc' || $viewType == 'api') and isonlybody()) die(js::reload('parent.parent'));
diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php
index eadb6e047e..b228aafd6f 100644
--- a/module/tree/lang/en.php
+++ b/module/tree/lang/en.php
@@ -71,3 +71,7 @@ $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 86282227e3..bdf4d69fed 100644
--- a/module/tree/lang/zh-cn.php
+++ b/module/tree/lang/zh-cn.php
@@ -71,3 +71,7 @@ $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 a24c60649a..a1908107c9 100644
--- a/module/tree/model.php
+++ b/module/tree/model.php
@@ -1638,7 +1638,13 @@ class treeModel extends model
$short = $shorts[$moduleID];
$order = $orders[$moduleID];
$moduleID = str_replace('id', '', $moduleID);
- $this->dao->update(TABLE_MODULE)->set('name')->eq(strip_tags(trim($moduleName)))->set('short')->eq($short)->set('order')->eq($order)->where('id')->eq($moduleID)->limit(1)->exec();
+
+ $data = new stdClass();
+ $data->name = strip_tags(trim($moduleName));
+ $data->short = $short;
+ $data->order = $order;
+
+ $this->dao->update(TABLE_MODULE)->data($data)->autoCheck()->where('id')->eq($moduleID)->limit(1)->exec();
}
}
diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php
index 4f0b027031..2b86c41a82 100644
--- a/module/tree/view/browse.html.php
+++ b/module/tree/view/browse.html.php
@@ -222,7 +222,7 @@ $(function()
},
itemCreator: function($li, item)
{
- var link = (item.id !== undefined && item.type != 'line') ? ('' + item.name + '') : ('' + item.name + '');
+ var link = (item.id !== undefined && item.type != 'line') ? ('' + item.name + '') : ('' + item.name + '');
var $toggle = $('' + link + '');
if(item.type === 'bug') $toggle.append(' [B]');
if(item.type === 'case') $toggle.append(' [C]');