From bbe226359df70867ebeafad030760ae107929dc9 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 25 Mar 2011 02:02:50 +0000 Subject: Refs #3119 if only one item left, move it off more menu (but only when nothing selected) git-svn-id: http://code.elgg.org/elgg/trunk@8834 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/navigation.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engine') diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 891527d38..16cdf9d4c 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -197,8 +197,9 @@ function elgg_site_menu_setup($hook, $type, $return, $params) { $max_display_items = 5; // the first n are shown, rest added to more list + // if only one item on more menu, stick it with the rest $num_menu_items = count($return['default']); - if ($num_menu_items > $max_display_items) { + if ($num_menu_items > ($max_display_items + 1)) { $return['more'] = array_splice($return['default'], $max_display_items); } } -- cgit v1.2.3