]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix reference to wrong class name 21146/head
authorDaniel Calviño Sánchez <danxuliu@gmail.com>
Thu, 28 May 2020 23:41:06 +0000 (01:41 +0200)
committerDaniel Calviño Sánchez <danxuliu@gmail.com>
Thu, 28 May 2020 23:41:06 +0000 (01:41 +0200)
\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 <danxuliu@gmail.com>
apps/files_sharing/lib/Controller/ShareAPIController.php

index 0fbd57b471334e71c14c18423d4c47e001683664..50ba39564ba428ac54111a7e8cb31703b705c312 100644 (file)
@@ -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);