diff --git a/module/tree/control.php b/module/tree/control.php index 8aeef10327..e8fe8800ea 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -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));