diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-30 04:11:28 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-30 04:11:28 -0700 |
commit | 480aeb804fc64be6fdcb1551f89e21304e270b33 (patch) | |
tree | f6bc00728db90071b6affea89b5c06c15909fe07 /lib/base.php | |
parent | ebb2278a6770cc68698e1ba5cb914d615b573519 (diff) | |
parent | 629faf6d343e7906322d125718f97d3ac2f9569b (diff) | |
download | nextcloud-server-480aeb804fc64be6fdcb1551f89e21304e270b33.tar.gz nextcloud-server-480aeb804fc64be6fdcb1551f89e21304e270b33.zip |
Merge pull request #4459 from owncloud/appframework-master
Public API for OC6+ (includes AppFramework)
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index 395d8486a5e..58894be03ee 100644 --- a/lib/base.php +++ b/lib/base.php @@ -84,6 +84,11 @@ class OC { */ public static $loader = null; + /** + * @var \OC\Server + */ + public static $server = null; + public static function initPaths() { // calculate the root directories OC::$SERVERROOT = str_replace("\\", '/', substr(__DIR__, 0, -4)); @@ -451,6 +456,9 @@ class OC { stream_wrapper_register('quota', 'OC\Files\Stream\Quota'); stream_wrapper_register('oc', 'OC\Files\Stream\OC'); + // setup the basic server + self::$server = new \OC\Server(); + self::initTemplateEngine(); if (!self::$CLI) { self::initSession(); @@ -557,11 +565,13 @@ class OC { if (OC_Config::getValue('installed', false)) { //don't try to do this before we are properly setup // register cache cleanup jobs try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception - \OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC'); + \OCP\BackgroundJob::registerJob('OC\Cache\FileGlobalGC'); } catch (Exception $e) { } - OC_Hook::connect('OC_User', 'post_login', 'OC_Cache_File', 'loginListener'); + // NOTE: This will be replaced to use OCP + $userSession = \OC_User::getUserSession(); + $userSession->listen('postLogin', '\OC\Cache\File', 'loginListener'); } } |