diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-17 11:48:13 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-17 11:48:13 +0300 |
commit | 749a9326309fef06cf93a3596816b3c235d557d1 (patch) | |
tree | 6fdf45bf93ddee7466d58144d0e4c803d8ee181c /lib | |
parent | f9ea752dcdf4c733a8668e19679f81b220dca767 (diff) |
Fix Application setup
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Api/Circles.php | 4 | ||||
-rw-r--r-- | lib/Api/Sharees.php | 2 | ||||
-rw-r--r-- | lib/Api/v1/Circles.php | 2 | ||||
-rw-r--r-- | lib/Api/v1/ShotgunCircles.php | 4 | ||||
-rw-r--r-- | lib/Cron/ContactsExistingShares.php | 2 | ||||
-rw-r--r-- | lib/Cron/GlobalSync.php | 2 | ||||
-rw-r--r-- | lib/Hooks/UserHooks.php | 2 | ||||
-rw-r--r-- | lib/ShareByCircleProvider.php | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/lib/Api/Circles.php b/lib/Api/Circles.php index 15efc0ed..1e0f58a6 100644 --- a/lib/Api/Circles.php +++ b/lib/Api/Circles.php @@ -47,10 +47,10 @@ class Circles { * @return Circle */ public static function detailsCircle($circleId) { - $app = new Application(); + $app = \OC::$server->query(Application::class); $c = $app->getContainer(); return $c->query(CirclesService::class) ->detailsCircle($circleId); } -}
\ No newline at end of file +} diff --git a/lib/Api/Sharees.php b/lib/Api/Sharees.php index 06856ea6..0783c0b2 100644 --- a/lib/Api/Sharees.php +++ b/lib/Api/Sharees.php @@ -46,7 +46,7 @@ class Sharees { protected static function getContainer() { - $app = new Application(); + $app = \OC::$server->query(Application::class); return $app->getContainer(); } diff --git a/lib/Api/v1/Circles.php b/lib/Api/v1/Circles.php index 294e9433..736f84cc 100644 --- a/lib/Api/v1/Circles.php +++ b/lib/Api/v1/Circles.php @@ -49,7 +49,7 @@ class Circles { const API_VERSION = [0, 10, 0]; protected static function getContainer() { - $app = new Application(); + $app = \OC::$server->query(Application::class); return $app->getContainer(); } diff --git a/lib/Api/v1/ShotgunCircles.php b/lib/Api/v1/ShotgunCircles.php index 7ea575bc..c732b619 100644 --- a/lib/Api/v1/ShotgunCircles.php +++ b/lib/Api/v1/ShotgunCircles.php @@ -48,7 +48,7 @@ use OCP\Util; class ShotgunCircles { protected static function getContainer() { - $app = new Application(); + $app = \OC::$server->query(Application::class); return $app->getContainer(); } @@ -76,4 +76,4 @@ class ShotgunCircles { } -}
\ No newline at end of file +} diff --git a/lib/Cron/ContactsExistingShares.php b/lib/Cron/ContactsExistingShares.php index 609874d0..53cd83e6 100644 --- a/lib/Cron/ContactsExistingShares.php +++ b/lib/Cron/ContactsExistingShares.php @@ -110,7 +110,7 @@ class ContactsExistingShares extends TimedJob { * @throws QueryException */ protected function run($argument) { - $app = new Application(); + $app = \OC::$server->query(Application::class); $c = $app->getContainer(); $this->davService = $c->query(DavService::class); diff --git a/lib/Cron/GlobalSync.php b/lib/Cron/GlobalSync.php index ef25f420..8de3972a 100644 --- a/lib/Cron/GlobalSync.php +++ b/lib/Cron/GlobalSync.php @@ -59,7 +59,7 @@ class GlobalSync extends TimedJob { * @throws QueryException */ protected function run($argument) { - $app = new Application(); + $app = \OC::$server->query(Application::class); $c = $app->getContainer(); /** @var GSUpstreamService $gsUpstreamService */ diff --git a/lib/Hooks/UserHooks.php b/lib/Hooks/UserHooks.php index eb8e7e6f..2614bda0 100644 --- a/lib/Hooks/UserHooks.php +++ b/lib/Hooks/UserHooks.php @@ -10,7 +10,7 @@ use OCA\Circles\Events\UserEvents; class UserHooks { static protected function getController() { - $app = new Application(); + $app = \OC::$server->query(Application::class); return $app->getContainer() ->query(UserEvents::class); diff --git a/lib/ShareByCircleProvider.php b/lib/ShareByCircleProvider.php index 7cf4d572..a7e81faa 100644 --- a/lib/ShareByCircleProvider.php +++ b/lib/ShareByCircleProvider.php @@ -115,7 +115,7 @@ class ShareByCircleProvider extends CircleProviderRequest implements IShareProvi IDBConnection $connection, ISecureRandom $secureRandom, IUserManager $userManager, IRootFolder $rootFolder, IL10N $l10n, ILogger $logger, IURLGenerator $urlGenerator ) { - $app = new Application(); + $app = \OC::$server->query(Application::class); $container = $app->getContainer(); $configService = $container->query(ConfigService::class); $miscService = $container->query(MiscService::class); |