aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-10-11 08:33:09 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-10-11 08:33:09 +0200
commit543190f8b3228b994ba897c9a43fdc3f61adf663 (patch)
tree650022215976952462cef64f59c25e86fa20a006 /apps/files_versions
parentf6a79338d4ea66f9c341d004951b606b5310b478 (diff)
downloadnextcloud-server-543190f8b3228b994ba897c9a43fdc3f61adf663.tar.gz
nextcloud-server-543190f8b3228b994ba897c9a43fdc3f61adf663.zip
Do not create Application instances directly
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/appinfo/routes.php3
-rw-r--r--apps/files_versions/lib/Storage.php4
2 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php
index 5fe6eaaee14..95722dd7780 100644
--- a/apps/files_versions/appinfo/routes.php
+++ b/apps/files_versions/appinfo/routes.php
@@ -26,7 +26,8 @@
namespace OCA\Files_Versions\AppInfo;
-$application = new Application();
+/** @var Application $application */
+$application = \OC::$server->query(Application::class);
$application->registerRoutes($this, [
'routes' => [
[
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index c42083ff352..168145ffec1 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -850,8 +850,8 @@ class Storage {
* @return Expiration
*/
protected static function getExpiration(){
- if (is_null(self::$application)) {
- self::$application = new Application();
+ if (self::$application === null) {
+ self::$application = \OC::$server->query(Application::class);
}
return self::$application->getContainer()->query(Expiration::class);
}