summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/ShareAPIController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareAPIController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index bd57d80dab0..c57a738457e 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -308,6 +308,8 @@ class ShareAPIController extends OCSController {
* @throws OCSForbiddenException
* @throws OCSBadRequestException
* @throws OCSException
+ *
+ * @suppress PhanUndeclaredClassMethod
*/
public function createShare(
$path = null,
@@ -450,11 +452,11 @@ class ShareAPIController extends OCSController {
}
$share->setSharedWith($shareWith);
} else if ($shareType === \OCP\Share::SHARE_TYPE_CIRCLE) {
- if (!\OCP\App::isEnabled('circles')) {
+ if (!\OC::$server->getAppManager()->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) {
throw new OCSNotFoundException($this->l->t('You cannot share to a Circle if the app is not enabled'));
}
- $circle = \OCA\Circles\Api\Circles::detailsCircle($shareWith);
+ $circle = \OCA\Circles\Api\v1\Circles::detailsCircle($shareWith);
// Valid circle is required to share
if ($circle === null) {