Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2022-01-23 20:33:28 +0300
committerdartcafe <github@dartcafe.de>2022-01-23 20:33:28 +0300
commite0c4aa169dd49efac429432f46fd196290eb5c81 (patch)
tree4a2474a63940ca876e8a2dba7b0cb9e814b0df39 /lib
parent495d25241d83684892e34c4c341e97cbb62a7d34 (diff)
replace deprecated class IAppContainer
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Helper/Container.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Helper/Container.php b/lib/Helper/Container.php
index d6da9697..f8fd4620 100644
--- a/lib/Helper/Container.php
+++ b/lib/Helper/Container.php
@@ -28,10 +28,11 @@ use OCA\Polls\Db\Poll;
use OCA\Polls\Db\PollMapper;
use OCA\Polls\Db\Share;
use OCA\Polls\Db\ShareMapper;
-use OCP\AppFramework\IAppContainer;
+use OCP\App\IAppManager;
+use Psr\Container\ContainerInterface;
abstract class Container {
- public static function getContainer() : IAppContainer {
+ public static function getContainer() : ContainerInterface {
$app = \OC::$server->query(Application::class);
return $app->getContainer();
}
@@ -50,6 +51,6 @@ abstract class Container {
}
public static function isAppEnabled(string $app) : bool {
- return \OC::$server->getAppManager()->isEnabledForUser($app);
+ return self::queryClass(IAppManager::class)->isEnabledForUser($app);
}
}