Don't spam the log with "Undefined index showInHeader"

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-27 10:24:10 +02:00
parent d9ebc2626f
commit 81d87b01fe
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 3 additions and 5 deletions

View File

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