aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-25 02:02:50 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-25 02:02:50 +0000
commitbbe226359df70867ebeafad030760ae107929dc9 (patch)
treef1d6b7d1b54a08b66d344a1fb97f8ff440ed8142 /engine
parent37ef28ed24c665c39315f119677958e81cc8e387 (diff)
downloadelgg-bbe226359df70867ebeafad030760ae107929dc9.tar.gz
elgg-bbe226359df70867ebeafad030760ae107929dc9.tar.bz2
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
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/navigation.php3
1 files changed, 2 insertions, 1 deletions
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);
}
}