aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-08-27 13:14:56 +0200
committerprovokateurin <kate@provokateurin.de>2024-09-09 11:04:36 +0200
commit669641142b35407ae8b6cce1cda95fdb77747ac9 (patch)
treec32ca64d71f43ed3a750c482b6710da155ae270e
parent01ec6762a249dbedc0bee452eb698c1dc6a52431 (diff)
downloadnextcloud-server-669641142b35407ae8b6cce1cda95fdb77747ac9.tar.gz
nextcloud-server-669641142b35407ae8b6cce1cda95fdb77747ac9.zip
fix(TemplateLayout): Use NavigationManager to get default app name
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r--lib/private/TemplateLayout.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 2e397d2a3e2..0ef4ec197cf 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -99,11 +99,10 @@ class TemplateLayout extends \OC_Template {
$logoUrl = $this->config->getSystemValueString('logo_url', '');
$this->assign('logoUrl', $logoUrl);
- // Set default app name
- $defaultApp = \OC::$server->getAppManager()->getDefaultAppForUser();
- $defaultAppInfo = \OC::$server->getAppManager()->getAppInfo($defaultApp);
- $l10n = \OC::$server->get(IFactory::class)->get($defaultApp);
- $this->assign('defaultAppName', $l10n->t($defaultAppInfo['name']));
+ // Set default entry name
+ $defaultEntryId = \OCP\Server::get(INavigationManager::class)->getDefaultEntryIdForUser();
+ $defaultEntry = \OCP\Server::get(INavigationManager::class)->get($defaultEntryId);
+ $this->assign('defaultAppName', $defaultEntry['name']);
// Add navigation entry
$this->assign('application', '');