diff options
author | Julius Härtl <jus@bitgrid.net> | 2017-06-15 21:51:51 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-06-16 10:51:31 +0200 |
commit | f039ba748032a78e70845adad9152730715a8219 (patch) | |
tree | 908786d51bdf65f90b906fd9289bd4fbc3f475f0 /lib/private/Server.php | |
parent | 0999ed1778d7b1d95e4fb45b5d28162f2cc4d985 (diff) | |
download | nextcloud-server-f039ba748032a78e70845adad9152730715a8219.tar.gz nextcloud-server-f039ba748032a78e70845adad9152730715a8219.zip |
Add tests and inject IRequest
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 159fab20be4..489683aa127 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -414,9 +414,11 @@ class Server extends ServerContainer implements IServerContainer { $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { $config = $c->getConfig(); $cacheFactory = $c->getMemCacheFactory(); + $request = $c->getRequest(); return new \OC\URLGenerator( $config, - $cacheFactory + $cacheFactory, + $request ); }); $this->registerAlias('URLGenerator', \OCP\IURLGenerator::class); @@ -433,13 +435,15 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias('UserCache', \OCP\ICache::class); $this->registerService(Factory::class, function (Server $c) { + $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), '\\OC\\Memcache\\ArrayCache', '\\OC\\Memcache\\ArrayCache', '\\OC\\Memcache\\ArrayCache' ); $config = $c->getConfig(); - $urlGenerator = new URLGenerator($config, $arrayCacheFactory); + $request = $c->getRequest(); + $urlGenerator = new URLGenerator($config, $arrayCacheFactory, $request); if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { $v = \OC_App::getAppVersions(); |