From b12a9c28195d8ccf30fd99c84eb2109514ed1415 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 15 Jun 2022 11:52:40 +0300 Subject: owner can set extra for reshared --- controller/sharingapicontroller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/sharingapicontroller.php b/controller/sharingapicontroller.php index 12ab326..1e5e633 100644 --- a/controller/sharingapicontroller.php +++ b/controller/sharingapicontroller.php @@ -155,8 +155,8 @@ class SharingApiController extends OCSController { return new DataResponse([]); } - $sharesUser = $this->shareManager->getSharesBy($userId, IShare::TYPE_USER, $sourceFile); - $sharesGroup = $this->shareManager->getSharesBy($userId, IShare::TYPE_GROUP, $sourceFile); + $sharesUser = $this->shareManager->getSharesBy($userId, IShare::TYPE_USER, $sourceFile, null, true); + $sharesGroup = $this->shareManager->getSharesBy($userId, IShare::TYPE_GROUP, $sourceFile, null, true); $shares = array_merge($sharesUser, $sharesGroup); $extras = $this->extraPermissions->getExtras($shares, $sourceFile); -- cgit v1.2.3 From 2075c236eb055de6afc3a9ac7f50e0fa34b2f1e0 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 16 Jun 2022 10:52:54 +0300 Subject: format types --- lib/extrapermissions.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/extrapermissions.php b/lib/extrapermissions.php index e98f37c..26a7d33 100644 --- a/lib/extrapermissions.php +++ b/lib/extrapermissions.php @@ -254,7 +254,7 @@ class ExtraPermissions { /** * Delete list extra permissions * - * @param integer $shareIds - array of share identifiers + * @param array $shareIds - array of share identifiers * * @return bool */ @@ -293,7 +293,9 @@ class ExtraPermissions { $values = $result ? $select->fetch() : []; - return $values; + $value = is_array($values) ? $values : []; + + return $value; } /** @@ -323,7 +325,9 @@ class ExtraPermissions { $values = $result ? $select->fetchAll() : []; - return $values; + $value = is_array($values) ? $values : []; + + return $value; } /** -- cgit v1.2.3