diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-07-11 18:03:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-11 18:03:06 +0200 |
commit | 9e2d1caba2d9043c9ae0b6854878f4a94d05ee4b (patch) | |
tree | b1ef96a3f27593af27125c6976afdad5c1408727 /apps | |
parent | 4153e1de795d0977756583e5845f849662ed6528 (diff) | |
parent | 6e7be6acfdf998eff0b229626dc533572318df80 (diff) | |
download | nextcloud-server-9e2d1caba2d9043c9ae0b6854878f4a94d05ee4b.tar.gz nextcloud-server-9e2d1caba2d9043c9ae0b6854878f4a94d05ee4b.zip |
Merge pull request #5681 from nextcloud/upstream-fix-circles
upstream fix circles
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index bd57d80dab0..458102036be 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -450,11 +450,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) { diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 57d51ebac6a..3e0c01b342e 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -472,7 +472,7 @@ class ShareesAPIController extends OCSController { $shareTypes[] = Share::SHARE_TYPE_EMAIL; } - if (\OCP\App::isEnabled('circles')) { + if (\OC::$server->getAppManager()->isEnabledForUser('circles') && class_exists('\OCA\Circles\ShareByCircleProvider')) { $shareTypes[] = Share::SHARE_TYPE_CIRCLE; } |