* Fix bug.

This commit is contained in:
tanghucheng
2022-03-11 14:03:30 +08:00
parent 5084aea498
commit 477e89a09e
5 changed files with 27 additions and 232 deletions
+5 -1
View File
@@ -501,7 +501,11 @@ class docModel extends model
*/
public function getById($docID, $version = 0, $setImgSize = false)
{
$doc = $this->dao->select('*')->from(TABLE_DOC)->where('id')->eq((int)$docID)->fetch();
$doc = $this->dao->select('*')->from(TABLE_DOC)
->where('id')->eq((int)$docID)
->andWhere('vision')->eq($this->config->vision)
->fetch();
if(!$doc) return false;
if(!$this->checkPrivDoc($doc))
{