aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Rudolf <github.com@daniel-rudolf.de>2021-08-05 11:02:21 +0200
committerDaniel Rudolf <github.com@daniel-rudolf.de>2021-08-05 13:55:35 +0200
commita1d6189dfa11e006a130bdd1c35200c1ef21c501 (patch)
tree97ace89cac62d0daaef335fcc3fd3d10e6b3bd89 /lib
parent4d7430949a5e6f6beba18a9b309dbc9d0d0a9a42 (diff)
downloadnextcloud-server-a1d6189dfa11e006a130bdd1c35200c1ef21c501.tar.gz
nextcloud-server-a1d6189dfa11e006a130bdd1c35200c1ef21c501.zip
Fix UrlGeneratorTest
And again... :unamused: Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/URLGenerator.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 7c97a76e257..1bb5610d95f 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -42,7 +42,6 @@ namespace OC;
use OC\Route\Router;
use OCA\Theming\ThemingDefaults;
-use OCP\App\IAppManager;
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IRequest;
@@ -58,8 +57,6 @@ class URLGenerator implements IURLGenerator {
private $config;
/** @var IUserSession */
public $userSession;
- /** @var IAppManager */
- public $appManager;
/** @var ICacheFactory */
private $cacheFactory;
/** @var IRequest */
@@ -71,13 +68,11 @@ class URLGenerator implements IURLGenerator {
public function __construct(IConfig $config,
IUserSession $userSession,
- IAppManager $appManager,
ICacheFactory $cacheFactory,
IRequest $request,
Router $router) {
$this->config = $config;
$this->userSession = $userSession;
- $this->appManager = $appManager;
$this->cacheFactory = $cacheFactory;
$this->request = $request;
$this->router = $router;
@@ -290,7 +285,7 @@ class URLGenerator implements IURLGenerator {
return $this->getAbsoluteURL(urldecode($_REQUEST['redirect_url']));
}
- $defaultPage = \OC::$server->getConfig()->getAppValue('core', 'defaultpage');
+ $defaultPage = $this->config->getAppValue('core', 'defaultpage');
if ($defaultPage) {
return $this->getAbsoluteURL($defaultPage);
}
@@ -307,7 +302,7 @@ class URLGenerator implements IURLGenerator {
// find the first app that is enabled for the current user
foreach ($defaultApps as $defaultApp) {
$defaultApp = \OC_App::cleanAppId(strip_tags($defaultApp));
- if ($this->appManager->isEnabledForUser($defaultApp)) {
+ if (\OC::$server->getAppManager()->isEnabledForUser($defaultApp)) {
$appId = $defaultApp;
break;
}