diff --git a/module/testcase/control.php b/module/testcase/control.php index 693c97c0b6..9db8b893bd 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1716,6 +1716,7 @@ class testcase extends control } /** + * 保存导入的 xmind 文件。 * Save imported xmind. * * @access public @@ -1723,7 +1724,7 @@ class testcase extends control */ public function saveXmindImport() { - if(!commonModel::hasPriv("testcase", "importXmind")) $this->loadModel('common')->deny('testcase', 'importXmind'); + if(!commonModel::hasPriv('testcase', 'importXmind')) $this->loadModel('common')->deny('testcase', 'importXmind'); if(!empty($_POST)) { $result = $this->testcase->saveXmindImport(); diff --git a/module/testcase/model.php b/module/testcase/model.php index 522ba549fd..3e646afc04 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -2591,6 +2591,7 @@ class testcaseModel extends model } /** + * 保存 xmind 文件内容。 * Save xmind file content to database. * * @access public @@ -2604,18 +2605,18 @@ class testcaseModel extends model $sceneList = $this->post->sceneList; foreach($sceneList as $scene) { - $tmpId = $scene["tmpId"]; - $tmpPId = $scene["tmpPId"]; + $tmpId = $scene['tmpId']; + $tmpPId = $scene['tmpPId']; $result = $this->saveScene($scene,$sceneIds); /* Rollback. */ - if($result["result"] == "fail") + if($result['result'] == 'fail') { $this->dao->rollBack(); return $result; } - $sceneIds[$tmpId] = array("id" => $result['sceneID'], "tmpPId" => $tmpPId); + $sceneIds[$tmpId] = array('id' => $result['sceneID'], 'tmpPId' => $tmpPId); } $testcaseList = $this->post->testcaseList; @@ -2632,7 +2633,7 @@ class testcaseModel extends model return $result; } - $sceneIds[$tmpId] = array("id" => $result['testcaseID'], "tmpPId" => $tmpPId); + $sceneIds[$tmpId] = array('id' => $result['testcaseID'], 'tmpPId' => $tmpPId); } $this->dao->commit();