From 387cac4c5fb9c797a94b8312778cd503cc951dda Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 11 Aug 2020 22:28:29 +0200 Subject: Properly inject IRouter into URLGenerator to properly encapsulate tests Signed-off-by: Morris Jobke --- lib/private/Route/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Route/Router.php') diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index ec91e08472c..94c637e5e0d 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -73,7 +73,7 @@ class Router implements IRouter { $this->logger = $logger; $baseUrl = \OC::$WEBROOT; if (!(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { - $baseUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php'); + $baseUrl .= '/index.php'; } if (!\OC::$CLI && isset($_SERVER['REQUEST_METHOD'])) { $method = $_SERVER['REQUEST_METHOD']; -- cgit v1.2.3