aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/admin/menu/save.php5
-rw-r--r--views/default/forms/admin/menu/save.php10
2 files changed, 8 insertions, 7 deletions
diff --git a/actions/admin/menu/save.php b/actions/admin/menu/save.php
index 3fdce8c45..66ce71082 100644
--- a/actions/admin/menu/save.php
+++ b/actions/admin/menu/save.php
@@ -9,12 +9,11 @@
// featured menu items
$featured_names = get_input('featured_menu_names', array());
$featured_names = array_unique($featured_names);
-if (in_array('', $featured_names)) {
- unset($featured_names[array_search('', $featured_names)]);
+if (in_array(' ', $featured_names)) {
+ unset($featured_names[array_search(' ', $featured_names)]);
}
elgg_save_config('site_featured_menu_names', $featured_names);
-
// custom menu items
$custom_menu_titles = get_input('custom_menu_titles', array());
$custom_menu_urls = get_input('custom_menu_urls', array());
diff --git a/views/default/forms/admin/menu/save.php b/views/default/forms/admin/menu/save.php
index 7b8a9a6cb..91129c881 100644
--- a/views/default/forms/admin/menu/save.php
+++ b/views/default/forms/admin/menu/save.php
@@ -3,6 +3,9 @@
* Form body for setting up site menu
*/
+// @todo Could probably make this number configurable
+$num_featured_items = 6;
+
// get site menu items
$menu = elgg_get_config('menus');
$menu = $menu['site'];
@@ -16,7 +19,7 @@ $dropdown_values = array();
foreach ($menu_items as $item) {
$dropdown_values[$item->getName()] = $item->getText();
}
-$dropdown_values[''] = elgg_echo('none');
+$dropdown_values[' '] = elgg_echo('none');
?>
<div class="elgg-module elgg-module-inline">
@@ -29,12 +32,11 @@ echo elgg_view('output/longtext', array(
'value' => elgg_echo("admin:menu_items:description")
));
-// @todo Could probably make this number configurable
-for ($i=0; $i<6; $i++) {
+for ($i=0; $i<$num_featured_items; $i++) {
if (array_key_exists($i, $featured_menu_names)) {
$current_value = $featured_menu_names[$i];
} else {
- $current_value = '';
+ $current_value = ' ';
}
echo elgg_view('input/dropdown', array(