* adjust search config for branch.

This commit is contained in:
wangyidong
2015-10-30 09:13:43 +08:00
parent 2fd60f85c3
commit e58fe08c46
15 changed files with 33 additions and 48 deletions
+2 -4
View File
@@ -856,8 +856,7 @@ class treeModel extends model
->where('root')->eq((int)$rootID)
->andWhere('parent')->eq((int)$moduleID)
->andWhere('type')->eq($type)
->beginIF(empty($branch))->andWhere("branch")->eq(0)->fi()
->beginIF(!empty($branch))->andWhere("branch")->eq($branch)->fi()
->andWhere("branch")->eq((int)$branch)
->orderBy('`order`')
->fetchAll();
}
@@ -868,8 +867,7 @@ class treeModel extends model
->where('root')->eq((int)$rootID)
->andWhere('parent')->eq((int)$moduleID)
->andWhere('type')->in($type)
->beginIF(empty($branch))->andWhere("branch")->eq(0)->fi()
->beginIF(!empty($branch))->andWhere("branch")->eq($branch)->fi()
->andWhere("branch")->eq((int)$branch)
->orderBy('type desc,`order`')
->fetchAll();
}