summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/ProviderFactory.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Share20/ProviderFactory.php')
-rw-r--r--lib/private/Share20/ProviderFactory.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php
index ddd8177250b..aedad6a32a7 100644
--- a/lib/private/Share20/ProviderFactory.php
+++ b/lib/private/Share20/ProviderFactory.php
@@ -51,9 +51,10 @@ class ProviderFactory implements IProviderFactory {
private $federatedProvider = null;
/** @var ShareByMailProvider */
private $shareByMailProvider;
- /** @var \OCA\Circles\ShareByCircleProvider;
- * ShareByCircleProvider */
- private $shareByCircleProvider;
+ /** @var \OCA\Circles\ShareByCircleProvider */
+ private $shareByCircleProvider = null;
+ /** @var bool */
+ private $circlesAreNotAvailable = false;
/**
* IProviderFactory constructor.
@@ -179,11 +180,16 @@ class ProviderFactory implements IProviderFactory {
*/
protected function getShareByCircleProvider() {
- $appManager = $this->serverContainer->getAppManager();
- if (!$appManager->isEnabledForUser('circles')) {
+ if ($this->circlesAreNotAvailable) {
return null;
}
+ if (!$this->serverContainer->getAppManager()->isEnabledForUser('circles') ||
+ !class_exists('\OCA\Circles\ShareByCircleProvider')
+ ) {
+ $this->circlesAreNotAvailable = true;
+ return null;
+ }
if ($this->shareByCircleProvider === null) {