From 2499478e5337d93d4feef4d1932d782343ba0184 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 9 Jul 2020 13:40:53 +0800 Subject: [PATCH] * Fix bug #3247. --- module/tree/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/tree/model.php b/module/tree/model.php index 7056f4e269..9b38f2369b 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -253,7 +253,12 @@ class treeModel extends model $treeMenu = array(); $lastMenu[] = '/'; $projectModules = $this->getTaskTreeModules($rootID, true); - $noProductModules = $this->dao->select('*')->from(TABLE_MODULE)->where("root = '" . (int)$rootID . "' and type = 'task' and parent = 0")->andWhere('deleted')->eq(0)->fetchPairs('id', 'name'); + $noProductModules = $this->dao->select('*')->from(TABLE_MODULE) + ->where("root = '" . (int)$rootID . "' and type = 'task' and parent = 0") + ->andWhere('deleted') + ->eq(0) + ->orderBy('grade desc, branch, `order`, type') + ->fetchPairs('id', 'name'); /* Fix for not in product modules. */ $productNum = count($products);