aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/NavigationManager.php
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-02-25 14:49:51 +0100
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-02-25 14:49:51 +0100
commitb578fd855e6b3e7b4b2d1b02357605d65fa0c32b (patch)
tree0f11a8e5ec36080a883f991fd11e095a3d2fcfa7 /lib/private/NavigationManager.php
parent36c51bc4f160d8b18de64739e9ffccccee8a5b25 (diff)
downloadnextcloud-server-b578fd855e6b3e7b4b2d1b02357605d65fa0c32b.tar.gz
nextcloud-server-b578fd855e6b3e7b4b2d1b02357605d65fa0c32b.zip
Generate id for navigation item
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/NavigationManager.php')
-rw-r--r--lib/private/NavigationManager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php
index a1d3d252af1..2c41fbd88c2 100644
--- a/lib/private/NavigationManager.php
+++ b/lib/private/NavigationManager.php
@@ -274,7 +274,7 @@ class NavigationManager implements INavigationManager {
if (!isset($info['navigations']['navigation'])) {
continue;
}
- foreach ($info['navigations']['navigation'] as $nav) {
+ foreach ($info['navigations']['navigation'] as $key => $nav) {
if (!isset($nav['name'])) {
continue;
}
@@ -286,7 +286,7 @@ class NavigationManager implements INavigationManager {
continue;
}
$l = $this->l10nFac->get($app);
- $id = isset($nav['id']) ? $nav['id'] : $app;
+ $id = $nav['id'] ?? $app . ($key === 0 ? '' : $key);
$order = isset($nav['order']) ? $nav['order'] : 100;
$type = isset($nav['type']) ? $nav['type'] : 'link';
$route = $nav['route'] !== '' ? $this->urlGenerator->linkToRoute($nav['route']) : '';