From d6dc09c08add976b6a080a23e0d7af5e9e47e163 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 14 Oct 2019 15:25:14 +0800 Subject: [PATCH 1/2] * finish task #6418. --- lib/api/api.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/api.class.php b/lib/api/api.class.php index 99ec4e2880..f5e1b00550 100755 --- a/lib/api/api.class.php +++ b/lib/api/api.class.php @@ -99,7 +99,7 @@ class ztclient $controlAPI = $this->zentao->root . $module . $this->zentao->requestFix . $method . $this->zentao->requestFix; if($vars) { - $vars = parse_str($vars); + parse_str($vars, $vars); foreach($vars as $var) $controlAPI .= $var . $this->zentao->requestFix; } $controlAPI = rtrim($controlAPI, $this->zentao->requestFix) . '.json'; From 33f5465b54e016fa0f884488f23af309c29d0c29 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 14 Oct 2019 15:43:58 +0800 Subject: [PATCH 2/2] * finish task #6416. --- module/task/control.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index f48081ef92..c6c47eabff 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -173,11 +173,18 @@ class task extends control } $users = $this->loadModel('user')->getPairs('noclosed|nodeleted'); - $moduleIdList = $this->tree->getAllChildID($moduleID); - $stories = $this->story->getProjectStoryPairs($projectID, 0, 0, $moduleIdList); $members = $this->project->getTeamMemberPairs($projectID, 'nodeleted'); $moduleOptionMenu = $this->tree->getTaskOptionMenu($projectID); + /* Fix bug #2737. When moduleID is not story module. */ + $moduleIdList = array(); + if($moduleID) + { + $moduleID = $this->tree->getStoryModule($moduleID); + $moduleIdList = $this->tree->getAllChildID($moduleID); + } + $stories = $this->story->getProjectStoryPairs($projectID, 0, 0, $moduleIdList); + $title = $project->name . $this->lang->colon . $this->lang->task->create; $position[] = html::a($taskLink, $project->name); $position[] = $this->lang->task->common;