summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/templates/layout.user.php5
-rw-r--r--lib/private/legacy/app.php6
2 files changed, 9 insertions, 2 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 8e88a07328f..4b0f6354b1c 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -74,7 +74,8 @@
</a>
</li>
<?php endforeach; ?>
- <?php if (count($_['navigation'])>$headerIconCount): ?>
+ <?php if (count($_['navigation'])>$headerIconCount
+ || (OC_User::isAdminUser(OC_User::getUser()) && count($_['navigation'])>=$headerIconCount)): ?>
<li id="more-apps" class="menutoggle">
<a href="#">
<div class="icon-more-white"></div>
@@ -83,7 +84,7 @@
</a>
</li>
<?php endif; ?>
- <?php if (count($_['navigation'])<=$headerIconCount): ?>
+ <?php if (count($_['navigation'])<$headerIconCount): ?>
<?php
/* show "More apps" link to app administration directly in app navigation, as last entry */
if(OC_User::isAdminUser(OC_User::getUser())):
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 3d0ebc9644c..c82d620882d 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -530,6 +530,9 @@ class OC_App {
// This is private as well. It simply works, so don't ask for more details
private static function proceedNavigation($list) {
$headerIconCount = 8;
+ if(OC_User::isAdminUser(OC_User::getUser())) {
+ $headerIconCount--;
+ }
usort($list, function($a, $b) {
if (isset($a['order']) && isset($b['order'])) {
return ($a['order'] < $b['order']) ? -1 : 1;
@@ -573,6 +576,9 @@ class OC_App {
public static function proceedAppNavigation($entries) {
$headerIconCount = 8;
+ if(OC_User::isAdminUser(OC_User::getUser())) {
+ $headerIconCount--;
+ }
$activeAppIndex = -1;
$list = self::proceedNavigation($entries);