From 0a09004d39b5d27124d59ed45debf109170b24d2 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 18 Dec 2015 11:24:15 +0100 Subject: Inject Config into SystemConfig --- lib/private/server.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/private/server.php') diff --git a/lib/private/server.php b/lib/private/server.php index 8439500706d..3e1af0310d1 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -84,8 +84,9 @@ class Server extends SimpleContainer implements IServerContainer { /** * @param string $webRoot + * @param \OC\Config $config */ - public function __construct($webRoot) { + public function __construct($webRoot, \OC\Config $config) { parent::__construct(); $this->webRoot = $webRoot; @@ -238,8 +239,8 @@ class Server extends SimpleContainer implements IServerContainer { $c->getSystemConfig() ); }); - $this->registerService('SystemConfig', function ($c) { - return new \OC\SystemConfig(); + $this->registerService('SystemConfig', function ($c) use ($config) { + return new \OC\SystemConfig($config); }); $this->registerService('AppConfig', function ($c) { return new \OC\AppConfig(\OC_DB::getConnection()); -- cgit v1.2.3