diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-03-27 15:53:08 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-27 15:53:08 -0600 |
commit | da11931815be81d3585d32950feab1f03796c22f (patch) | |
tree | 500f1b5b6398727ae8f163d0715c2fcb0d94b973 /lib/private/legacy | |
parent | 56243e07cb98d93b5fe0334cf52ba17355f41f33 (diff) | |
parent | 81d87b01fe732d8bdfd3fd77aa42b36c6de9e738 (diff) | |
download | nextcloud-server-da11931815be81d3585d32950feab1f03796c22f.tar.gz nextcloud-server-da11931815be81d3585d32950feab1f03796c22f.zip |
Merge pull request #4084 from nextcloud/fix-log-spam-with-too-few-navigation-items
Don't spam the log with "Undefined index showInHeader"
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/app.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 68a8383afbf..56ab59f7238 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -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; } |