aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-09-25 17:39:37 -0400
committercash <cash.costello@gmail.com>2011-09-25 17:39:37 -0400
commit33d791bee34f1b2d5ae6b0c8e184c4bb1c00bc1a (patch)
treec550c5279c65d048e4c0a980dbc980460ac8adb0
parentb59030e738550161ad2f1aec12e414e5d09bedae (diff)
downloadelgg-33d791bee34f1b2d5ae6b0c8e184c4bb1c00bc1a.tar.gz
elgg-33d791bee34f1b2d5ae6b0c8e184c4bb1c00bc1a.tar.bz2
Fixes #3876 fixed dangling more site menu when items are manually selected - thanks to JEBailey
-rw-r--r--engine/lib/navigation.php4
-rw-r--r--views/default/navigation/menu/site.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index 0e9ec1c17..27af26be2 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -285,7 +285,9 @@ function elgg_site_menu_setup($hook, $type, $return, $params) {
}
$return['default'] = $featured;
- $return['more'] = $registered;
+ if (count($registered) > 0) {
+ $return['more'] = $registered;
+ }
} else {
// no featured menu items set
$max_display_items = 5;
diff --git a/views/default/navigation/menu/site.php b/views/default/navigation/menu/site.php
index e2d3aa8fa..38b42bda9 100644
--- a/views/default/navigation/menu/site.php
+++ b/views/default/navigation/menu/site.php
@@ -11,7 +11,7 @@ foreach ($vars['menu']['default'] as $menu_item) {
echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
}
-if (isset($vars['menu']['more'])) {
+if (isset($vars['menu']['more']) && !empty($vars['menu']['more'])) {
echo '<li class="elgg-more">';
$more = elgg_echo('more');