diff --git a/module/doc/control.php b/module/doc/control.php index 4858f4c5da..b0d9b2069b 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -56,15 +56,15 @@ class doc extends control /** * Browse docs. - * + * * @param string|int $libID product|project or the int id of custom library - * @param int $moduleID - * @param int $productID - * @param int $projectID - * @param string $orderBy - * @param int $recTotal - * @param int $recPerPage - * @param int $pageID + * @param int $moduleID + * @param int $productID + * @param int $projectID + * @param string $orderBy + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ @@ -75,7 +75,7 @@ class doc extends control $this->loadModel('search'); - /* Set browseType.*/ + /* Set browseType.*/ $browseType = strtolower($browseType); if(($this->cookie->browseType == 'bymenu' or $this->cookie->browseType == 'bytree') and $browseType != 'bysearch') $browseType = $this->cookie->browseType; $queryID = ($browseType == 'bysearch') ? (int)$param : 0; @@ -128,10 +128,10 @@ class doc extends control /* Append id for secend sort. */ if($browseType == 'bymenu' and strtolower($orderBy) != 'editeddate_desc' and strtolower($orderBy) != 'addeddate_desc') $orderBy = 'title_asc'; $sort = $this->loadModel('common')->appendOrder($orderBy); - + /* Get docs by browse type. */ $docs = $this->doc->getDocsByBrowseType($libID, $browseType, $queryID, $moduleID, $sort, $pager); - + /* Build the search form. */ $actionURL = $this->createLink('doc', 'browse', "lib=$libID&browseType=bySearch&queryID=myQueryID&orderBy=$orderBy&from=$from"); $this->doc->buildSearchForm($libID, $this->libs, $queryID, $actionURL, $type); @@ -637,7 +637,7 @@ class doc extends control $lib = $this->project->getById($objectID); if(!$this->project->checkPriv($lib)) $this->accessDenied(); } - + $this->doc->setMenu($libID = 0, $moduleID = 0, $crumb); } diff --git a/module/doc/model.php b/module/doc/model.php index 03c1449135..355e816859 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -263,13 +263,13 @@ class docModel extends model /** * Get docs. - * - * @param int|string $libID - * @param int $productID - * @param int $projectID - * @param int $module - * @param string $orderBy - * @param object $pager + * + * @param int|string $libID + * @param int $productID + * @param int $projectID + * @param int $module + * @param string $orderBy + * @param object $pager * @access public * @return void */ @@ -286,9 +286,9 @@ class docModel extends model /** * Get priv docs. - * - * @param int $libID - * @param int $module + * + * @param int $libID + * @param int $module * @access public * @return void */ @@ -298,6 +298,7 @@ class docModel extends model ->where('deleted')->eq(0) ->beginIF($libID)->andWhere('lib')->in($libID)->fi() ->beginIF($module)->andWhere('module')->in($module)->fi() + ->beginIF($this->cookie->browseType == 'bymenu')->andWhere('module')->in($module)->fi() ->query(); $docIdList = array(); @@ -310,9 +311,9 @@ class docModel extends model /** * Get doc info by id. - * - * @param int $docID - * @param bool $setImgSize + * + * @param int $docID + * @param bool $setImgSize * @access public * @return void */ @@ -908,9 +909,9 @@ class docModel extends model /** * Get lib files. - * - * @param string $type - * @param int $objectID + * + * @param string $type + * @param int $objectID * @access public * @return array */ diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index cd63595f32..4fb764ba47 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -92,7 +92,7 @@ var browseType = ''; addedDate, 5, 11);?> editedDate, 5, 11);?> - id}", '', 'list'); if(common::hasPriv('doc', 'delete')) {