summaryrefslogtreecommitdiffstats
path: root/lib/private/NavigationManager.php
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-13 09:33:57 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-13 09:33:57 +0200
commit6f45607f57c55550808824ffdeebbf10353a2554 (patch)
tree632299fe9ad96d6ef54001121a9bfaa61de1bc20 /lib/private/NavigationManager.php
parent1f9e50086cc404d6dd46c5ae664f951faaf74c98 (diff)
downloadnextcloud-server-6f45607f57c55550808824ffdeebbf10353a2554.tar.gz
nextcloud-server-6f45607f57c55550808824ffdeebbf10353a2554.zip
Upgraded navigation submenu management and api + created sharing submenu
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
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 1c764f9c1ff..1874cd0e4ff 100644
--- a/lib/private/NavigationManager.php
+++ b/lib/private/NavigationManager.php
@@ -100,7 +100,7 @@ class NavigationManager implements INavigationManager {
if(!isset($entry['type'])) {
$entry['type'] = 'link';
}
- $this->entries[] = $entry;
+ $this->entries[$entry['id']] = $entry;
}
/**
@@ -133,7 +133,7 @@ class NavigationManager implements INavigationManager {
* @return array
*/
private function proceedNavigation(array $list): array {
- usort($list, function($a, $b) {
+ uasort($list, function($a, $b) {
if (isset($a['order']) && isset($b['order'])) {
return ($a['order'] < $b['order']) ? -1 : 1;
} else if (isset($a['order']) || isset($b['order'])) {