From 8552f83aebb460a4f7de0ef7b5b11cb2ce528381 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 29 Mar 2023 13:57:41 +0800 Subject: [PATCH] * Modify the scope of a document that can be viewed. --- module/doc/model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/doc/model.php b/module/doc/model.php index e83ca01646..ad7eb0c406 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2736,12 +2736,15 @@ class docModel extends model $libs = $this->getLibsByObject($type, $objectID); $query = $this->session->$queryName; if(strpos($query, "`lib` = 'all'") !== false) $query = str_replace("`lib` = 'all'", '1', $query); + + $docIdList = $this->getPrivDocs(array_keys($libs)); return $this->dao->select('*')->from(TABLE_DOC) ->where('deleted')->eq(0) ->andWhere($query) ->andWhere('lib')->in(array_keys($libs)) ->andWhere('vision')->eq($this->config->vision) ->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi() + ->beginIF(!empty($docIdList))->andWhere('id')->in($docIdList)->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id');