* adjust code for ajaxGetSonModules.
This commit is contained in:
@@ -332,10 +332,9 @@ class tree extends control
|
||||
*/
|
||||
public function ajaxGetSonModules($moduleID, $rootID = 0, $type = 'story')
|
||||
{
|
||||
if($moduleID) die(json_encode($this->dao->select('id,name')->from(TABLE_MODULE)->where('parent')->eq($moduleID)->andWhere('type')->eq($type)->fetchPairs('id', 'name')));
|
||||
$modules = $this->dao->select('id, name')->from(TABLE_MODULE)
|
||||
->where('root')->eq($rootID)
|
||||
->andWhere('parent')->eq('0')
|
||||
->andWhere('parent')->eq((int)$moduleID)
|
||||
->andWhere('type')->eq($type)
|
||||
->fetchPairs();
|
||||
die(json_encode($modules));
|
||||
|
||||
Reference in New Issue
Block a user