diff options
Diffstat (limited to 'apps/files_versions/lib/storage.php')
-rw-r--r-- | apps/files_versions/lib/storage.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php index 90fe308e970..ba2b78ff4d2 100644 --- a/apps/files_versions/lib/storage.php +++ b/apps/files_versions/lib/storage.php @@ -68,6 +68,9 @@ class Storage { //until the end one version per week 6 => array('intervalEndsAfter' => -1, 'step' => 604800), ); + + /** @var \OCA\Files_Versions\AppInfo\Application */ + private static $application; public static function getUidAndFilename($filename) { $uid = \OC\Files\Filesystem::getOwner($filename); @@ -709,8 +712,10 @@ class Storage { * @return Expiration */ protected static function getExpiration(){ - $application = new Application(); - return $application->getContainer()->query('Expiration'); + if (is_null(self::$application)) { + self::$application = new Application(); + } + return self::$application->getContainer()->query('Expiration'); } } |