diff options
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 5bc72e3614f..d88a687bbc4 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -124,7 +124,8 @@ class Server extends ServerContainer implements IServerContainer { $c->getConfig(), $c->getRootFolder(), $c->getAppDataDir('preview'), - $c->getEventDispatcher() + $c->getEventDispatcher(), + $c->getSession()->get('user_id') ); }); @@ -418,9 +419,8 @@ class Server extends ServerContainer implements IServerContainer { ); }); $this->registerService('Logger', function (Server $c) { - $logClass = $c->query('AllConfig')->getSystemValue('log_type', 'file'); - // TODO: Drop backwards compatibility for config in the future - $logger = 'OC\\Log\\' . ucfirst($logClass=='owncloud' ? 'file' : $logClass); + $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); + $logger = Log::getLogClass($logType); call_user_func(array($logger, 'init')); return new Log($logger); @@ -482,7 +482,7 @@ class Server extends ServerContainer implements IServerContainer { $uid = $user ? $user : null; return new ClientService( $c->getConfig(), - new \OC\Security\CertificateManager($uid, new View(), $c->getConfig()) + new \OC\Security\CertificateManager($uid, new View(), $c->getConfig(), $c->getLogger()) ); }); $this->registerService('EventLogger', function (Server $c) { @@ -898,7 +898,6 @@ class Server extends ServerContainer implements IServerContainer { return $this->query('SystemTagObjectMapper'); } - /** * Returns the avatar manager, used for avatar functionality * @@ -1221,7 +1220,7 @@ class Server extends ServerContainer implements IServerContainer { } $userId = $user->getUID(); } - return new CertificateManager($userId, new View(), $this->getConfig()); + return new CertificateManager($userId, new View(), $this->getConfig(), $this->getLogger()); } /** |