From 8ec093ecc1bf28c09f5d2dbe3c7bc8e6a2485ac6 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 18 Dec 2010 16:37:16 +0000 Subject: site nav menu now uses new menu code (and finished the implementation of custom menu items while I was at it - not backward compatible with the previous half finished version) git-svn-id: http://code.elgg.org/elgg/trunk@7668 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/admin/menu/save.php | 35 +++++++++++++++++++++++++++++++ actions/admin/menu_items.php | 50 -------------------------------------------- 2 files changed, 35 insertions(+), 50 deletions(-) create mode 100644 actions/admin/menu/save.php delete mode 100644 actions/admin/menu_items.php (limited to 'actions') diff --git a/actions/admin/menu/save.php b/actions/admin/menu/save.php new file mode 100644 index 000000000..3fdce8c45 --- /dev/null +++ b/actions/admin/menu/save.php @@ -0,0 +1,35 @@ + $info) { - $menu_urls[$info->value->url] = $info; -} - -foreach ($featured_urls as $url) { - if (array_key_exists($url, $menu_urls)) { - $featured_url_info[] = $menu_urls[$url]; - } -} - -// save the custom items -$custom_count = count($custom_item_names); -$custom_items = array(); -for ($i = 0; $i < $custom_count; $i++) { - if (isset($custom_item_names[$i]) && isset($custom_item_names[$i])) { - $name = $custom_item_names[$i]; - $url = $custom_item_urls[$i]; - - if ($name && $url) { - $custom_items[$url] = $name; - } - } -} - - -// set_config() always returns 0 so can't check for failures -set_config('menu_items_featured_urls', $featured_url_info); -set_config('menu_items_custom_items', $custom_items); - -system_message(elgg_echo('admin:menu_items:saved')); - -forward(REFERER); -- cgit v1.2.3