From 5611ad49c613a74a94c8eb60a4ceecbc36d9c662 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Wed, 7 Aug 2024 07:43:22 +0000 Subject: [PATCH] * [bug#53573,done,1h] fix bug. --- module/doc/model.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/module/doc/model.php b/module/doc/model.php index eb0c86b392..4efaba47b0 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -880,12 +880,20 @@ class docModel extends model */ public function getTeamSpaces(): array { - return $this->dao->select('id, name')->from(TABLE_DOCLIB) + $objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB) ->where('type')->eq('custom') ->andWhere('deleted')->eq(0) ->andWhere('parent')->eq(0) ->andWhere('vision')->eq($this->config->vision) - ->fetchPairs(); + ->fetchAll(); + + $pairs = array(); + foreach($objectLibs as $lib) + { + if($this->checkPrivLib($lib)) $pairs[$lib->id] = $lib->name; + } + + return $pairs; } /**