* Fix module orderBy.

This commit is contained in:
Yagami
2018-11-12 15:52:20 +08:00
parent dd052ef32c
commit 9a2a2b234d
+2 -2
View File
@@ -226,7 +226,7 @@ class treeModel extends model
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'task' and parent != 0) OR (root = $id and type = 'story'))")
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
->andWhere('deleted')->eq(0)
->orderBy('grade desc, branch, type, `order`')
->orderBy('grade desc, type, `order`')
->fetchAll('id');
}
else
@@ -234,7 +234,7 @@ class treeModel extends model
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("root = '" . (int)$rootID . "' and type = 'task' and path like '%,$id,%'")
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
->andWhere('deleted')->eq(0)
->orderBy('grade desc, type, `order`')
->orderBy('grade desc, branch, type, `order`')
->fetchAll('id');
}