From 37f231333fd4d5522112a64af77b95aed20a2295 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 29 May 2020 01:41:06 +0200 Subject: [PATCH] Fix reference to wrong class name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit \OCP\IShare does not exist; the right name is \OCP\Share\IShare, although it is already imported as IShare. Signed-off-by: Daniel Calviño Sánchez --- apps/files_sharing/lib/Controller/ShareAPIController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 0fbd57b4713..50ba39564ba 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1603,15 +1603,15 @@ class ShareAPIController extends OCSController { return false; } - if ($share->getShareType() === \OCP\IShare::TYPE_USER && $share->getSharedWith() === $userId) { + if ($share->getShareType() === IShare::TYPE_USER && $share->getSharedWith() === $userId) { return true; } - if ($share->getShareType() === \OCP\IShare::TYPE_GROUP && $this->groupManager->isInGroup($userId, $share->getSharedWith())) { + if ($share->getShareType() === IShare::TYPE_GROUP && $this->groupManager->isInGroup($userId, $share->getSharedWith())) { return true; } - if ($share->getShareType() === \OCP\IShare::TYPE_CIRCLE && \OC::$server->getAppManager()->isEnabledForUser('circles') + if ($share->getShareType() === IShare::TYPE_CIRCLE && \OC::$server->getAppManager()->isEnabledForUser('circles') && class_exists('\OCA\Circles\Api\v1\Circles')) { $hasCircleId = (substr($share->getSharedWith(), -1) === ']'); $shareWithStart = ($hasCircleId ? strrpos($share->getSharedWith(), '[') + 1 : 0); -- 2.39.5