From 18dbdd7f36fc629a07fef71fabb659506afb4748 Mon Sep 17 00:00:00 2001 From: Yagami Date: Wed, 10 Oct 2018 09:35:12 +0800 Subject: [PATCH] * Finish task #4963. --- module/bug/control.php | 2 +- module/file/lang/en.php | 2 +- module/file/lang/zh-cn.php | 2 +- module/file/view/export2csv.html.php | 2 +- module/file/view/export2html.html.php | 2 +- module/story/control.php | 2 +- module/testcase/control.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index b3c5f14be9..0c80c13efe 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1490,7 +1490,7 @@ class bug extends control /* Get related objects title or names. */ $productsType = $this->dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs(); - $relatedModules = array('0' => '/') + $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($relatedModuleIdList)->fetchPairs(); + $relatedModules = $this->loadModel('tree')->getOptionMenu($productID, 'bug'); $relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs(); $relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs(); $relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs(); diff --git a/module/file/lang/en.php b/module/file/lang/en.php index 43aead0996..f438da991a 100644 --- a/module/file/lang/en.php +++ b/module/file/lang/en.php @@ -44,7 +44,7 @@ $lang->file->downloads = 'Downloads'; $lang->file->extra = 'Extra'; $lang->file->dragFile = 'Please drag here.'; -$lang->file->childTaskTag = 'It\'s child task where \'>\' before the name.'; +$lang->file->childTaskTips = 'It\'s child task where \'>\' before the name.'; $lang->file->errorNotExists = "'%s' is not found."; $lang->file->errorCanNotWrite = "'%s' is not writable. Please change its permission. Enter sudo chmod -R 777 '%s' in Linux."; $lang->file->confirmDelete = " Do you want to delete it?"; diff --git a/module/file/lang/zh-cn.php b/module/file/lang/zh-cn.php index 19004afcf4..bff49bdfc0 100644 --- a/module/file/lang/zh-cn.php +++ b/module/file/lang/zh-cn.php @@ -44,7 +44,7 @@ $lang->file->downloads = '下载次数'; $lang->file->extra = '备注'; $lang->file->dragFile = '请拖拽文件到此处'; -$lang->file->childTaskTag = "任务名称前有'>'标记的为子任务"; +$lang->file->childTaskTips = "任务名称前有'>'标记的为子任务"; $lang->file->errorNotExists = "文件夹 '%s' 不存在"; $lang->file->errorCanNotWrite = "文件夹 '%s' 不可写,请改变文件夹的权限。在linux中输入指令: sudo chmod -R 777 %s"; $lang->file->confirmDelete = " 您确定删除该附件吗?"; diff --git a/module/file/view/export2csv.html.php b/module/file/view/export2csv.html.php index 0886160707..09323e1fc5 100644 --- a/module/file/view/export2csv.html.php +++ b/module/file/view/export2csv.html.php @@ -22,4 +22,4 @@ foreach($rows as $row) } echo '"' . "\n"; } -echo $this->lang->file->childTaskTag; +if($this->post->kind == 'task') echo $this->lang->file->childTaskTips; diff --git a/module/file/view/export2html.html.php b/module/file/view/export2html.html.php index 01d07eeff4..ca4322ab5b 100644 --- a/module/file/view/export2html.html.php +++ b/module/file/view/export2html.html.php @@ -19,7 +19,7 @@ table th,table td{padding:5px;} <?php echo $fileName;?> -" . $this->lang->file->childTaskTag . '';?> +post->kind == 'task') echo "" . $this->lang->file->childTaskTag . '';?> dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs(); - $relatedModules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($relatedModuleIdList)->fetchPairs(); + $relatedModules = $this->loadModel('tree')->getOptionMenu($productID); $relatedPlans = $this->dao->select('id, title')->from(TABLE_PRODUCTPLAN)->where('id')->in(join(',', $relatedPlanIdList))->fetchPairs(); $relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs(); $relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('story')->andWhere('objectID')->in(@array_keys($stories))->andWhere('extra')->ne('editor')->fetchGroup('objectID'); diff --git a/module/testcase/control.php b/module/testcase/control.php index 7cb0cdb893..ef2b0e28d2 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1100,7 +1100,7 @@ class testcase extends control } /* Get related objects title or names. */ - $relatedModules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($relatedModuleIdList)->fetchPairs(); + $relatedModules = $this->loadModel('tree')->getOptionMenu($productID, 'case'); $relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs(); $relatedCases = $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($relatedCaseIdList)->fetchPairs(); $relatedSteps = $this->dao->select('id,parent,`case`,version,type,`desc`,expect')->from(TABLE_CASESTEP)->where('`case`')->in(@array_keys($cases))->orderBy('version desc,id')->fetchGroup('case', 'id');