diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-05 14:21:17 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-05 14:21:17 +0200 |
commit | 5e60795962d383b107a565944d994c51b4b36022 (patch) | |
tree | a187ecf70cec31437a1f60c0947f9883b0c94bb1 /lib/base.php | |
parent | ccbb1cce3ce966dd8efbc18c7c6181d671df4434 (diff) | |
download | nextcloud-server-5e60795962d383b107a565944d994c51b4b36022.tar.gz nextcloud-server-5e60795962d383b107a565944d994c51b4b36022.zip |
Bring back OC\Cache\File - fixes #16760
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 77b0a89a90b..abbb67ee5be 100644 --- a/lib/base.php +++ b/lib/base.php @@ -652,6 +652,7 @@ class OC { OC_User::setupBackends(); } + self::registerCacheHooks(); self::registerFilesystemHooks(); if (\OC::$server->getSystemConfig()->getValue('enable_previews', true)) { self::registerPreviewHooks(); @@ -719,6 +720,19 @@ class OC { }); } + /** + * register hooks for the cache + */ + public static function registerCacheHooks() { + //don't try to do this before we are properly setup + if (\OC::$server->getSystemConfig()->getValue('installed', false) && !\OCP\Util::needUpgrade()) { + + // NOTE: This will be replaced to use OCP + $userSession = self::$server->getUserSession(); + $userSession->listen('postLogin', '\OC\Cache\File', 'loginListener'); + } + } + private static function registerEncryptionWrapper() { \OCP\Util::connectHook('OC_Filesystem', 'preSetup', 'OC\Encryption\Manager', 'setupStorage'); } |