* fix error.

This commit is contained in:
wangyidong
2023-04-11 09:43:24 +08:00
parent 4926b80ad0
commit f37eea5af8
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ class doc extends control
$docs = array();
if($type == 'mine')
{
$docs = $this->doc->getDocs($libID, $moduleID, $browseType, $orderBy, $pager);
$docs = $libID ? $this->doc->getDocs($libID, $moduleID, $browseType, $orderBy, $pager) : array();
}
elseif($type == 'view' or $type == 'collect' or $type == 'createdby')
{
+3 -2
View File
@@ -575,7 +575,8 @@ class docModel extends model
*/
public function getObjectsByDoc($docIdList = array())
{
if(empty($docIdList)) return array();
$projects = $executions = $products = array();
if(empty($docIdList)) return array($projects, $executions, $products);
$projects = $this->dao->select('t1.id, t1.name')->from(TABLE_PROJECT)->alias('t1')
->leftJoin(TABLE_DOC)->alias('t2')->on('t1.id=t2.project')
@@ -3061,7 +3062,7 @@ class docModel extends model
$myLib->objectID = 0;
$myLib->active = 0;
$myLib->hasAction = false;
$myLib->active = $libID ? 1 : 0;
$myLib->active = zget($this->app->rawParams, 'type', '') == 'mine' ? 1 : 0;
$myLib->children = $libTree;
$myView = new stdclass();