]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't spam the log with "Undefined index showInHeader" 4084/head
authorJoas Schilling <coding@schilljs.com>
Mon, 27 Mar 2017 08:24:10 +0000 (10:24 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 27 Mar 2017 08:24:10 +0000 (10:24 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/legacy/app.php

index 68a8383afbf79d3defab53dd3020426f6f1b8088..56ab59f7238e58c1625a677472873e53b82d064a 100644 (file)
@@ -472,6 +472,7 @@ class OC_App {
                $activeAppIndex = -1;
                $activeApp = OC::$server->getNavigationManager()->getActiveEntry();
                foreach ($list as $index => &$navEntry) {
+                       $navEntry['showInHeader'] = true;
                        if ($navEntry['id'] == $activeApp) {
                                $navEntry['active'] = true;
                                $activeAppIndex = $index;
@@ -494,14 +495,11 @@ class OC_App {
                }
 
                foreach ($list as $index => &$navEntry) {
-                       $navEntry['showInHeader'] = false;
-                       if($index < $headerIconCount) {
-                               $navEntry['showInHeader'] = true;
+                       if($index >= $headerIconCount) {
+                               $navEntry['showInHeader'] = false;
                        }
                }
 
-
-
                return $list;
        }