Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Linnik <sergey.linnik@onlyoffice.com>2022-06-16 12:26:32 +0300
committerSergey Linnik <sergey.linnik@onlyoffice.com>2022-06-16 12:26:32 +0300
commit75425b77aec71080e3ae0436eb3e5b5171e5a83a (patch)
treede28df835b6ca6e60497d2bb89042b47a695539f
parentffab685fb26c78d3a16e611897ebbfc4a00c10e2 (diff)
parent2075c236eb055de6afc3a9ac7f50e0fa34b2f1e0 (diff)
Merge branch 'feature/nc-23' into develop
-rw-r--r--controller/sharingapicontroller.php4
-rw-r--r--lib/extrapermissions.php10
2 files changed, 9 insertions, 5 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);
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;
}
/**