aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/URLGenerator.php
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-03-29 13:36:45 -0700
committerChristopher Ng <chrng8@gmail.com>2023-03-29 13:36:45 -0700
commit4f8e916585889b99247d967d51325ac0c840ec59 (patch)
tree67e9b24aa50f033cf88d52f53b648bb2bd30aab4 /lib/private/URLGenerator.php
parentfc371facd202d7ede86f1adb37fc78a8c478deff (diff)
downloadnextcloud-server-4f8e916585889b99247d967d51325ac0c840ec59.tar.gz
nextcloud-server-4f8e916585889b99247d967d51325ac0c840ec59.zip
Add label for logo link
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib/private/URLGenerator.php')
-rw-r--r--lib/private/URLGenerator.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 7be2895a1ef..a5a3609703b 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -311,23 +311,7 @@ class URLGenerator implements IURLGenerator {
return $this->getAbsoluteURL($defaultPage);
}
- $appId = 'files';
- $defaultApps = explode(',', $this->config->getSystemValue('defaultapp', 'dashboard,files'));
-
- $userId = $this->userSession->isLoggedIn() ? $this->userSession->getUser()->getUID() : null;
- if ($userId !== null) {
- $userDefaultApps = explode(',', $this->config->getUserValue($userId, 'core', 'defaultapp'));
- $defaultApps = array_filter(array_merge($userDefaultApps, $defaultApps));
- }
-
- // find the first app that is enabled for the current user
- foreach ($defaultApps as $defaultApp) {
- $defaultApp = \OC_App::cleanAppId(strip_tags($defaultApp));
- if (\OC::$server->getAppManager()->isEnabledForUser($defaultApp)) {
- $appId = $defaultApp;
- break;
- }
- }
+ $appId = $this->getAppManager()->getDefaultAppForUser();
if ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true
|| getenv('front_controller_active') === 'true') {