diff --git a/module/doc/model.php b/module/doc/model.php index 7ee02abef2..f25b659ee5 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -61,19 +61,19 @@ class docModel extends model * @param string $extra * @param string $appendLibs * @param int $objectID - * @param string $exclude + * @param string $excludeType * * @access public * @return array */ - public function getLibs($type = '', $extra = '', $appendLibs = '', $objectID = 0, $exclude = '') + public function getLibs($type = '', $extra = '', $appendLibs = '', $objectID = 0, $excludeType = '') { if($type == 'all' or $type == 'includeDeleted') { $stmt = $this->dao->select('*')->from(TABLE_DOCLIB) ->where('type')->ne('api') ->beginIF($type == 'all')->andWhere('deleted')->eq(0)->fi() - ->beginIF($exclude)->andWhere('type')->notin($exclude)->fi() + ->beginIF($excludeType)->andWhere('type')->notin($excludeType)->fi() ->andWhere('vision')->eq($this->config->vision) ->orderBy('`order` asc, id_desc') ->query(); diff --git a/module/tree/control.php b/module/tree/control.php index bef5d3a982..694fb98501 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -376,10 +376,8 @@ class tree extends control { $this->view->optionMenu = $this->tree->getOptionMenu($module->root, $module->type, 0, $module->branch); } - if($type == 'doc') - { - $this->view->libs = $this->loadModel('doc')->getLibs('all', $extra = 'withObject', '', 0, 'book'); - } + + if($type == 'doc') $this->view->libs = $this->loadModel('doc')->getLibs('all', $extra = 'withObject', '', 0, 'book'); $this->view->module = $module; $this->view->type = $type;