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;
$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;
}