aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-20 20:21:44 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-20 20:21:44 +0000
commitad745e050da855d326d1b6bc3df8032c05574392 (patch)
treeb6387add3efde9340aac120ab16c727b5f30f278 /engine
parent6f8da12756183dc29227b3b4c07650ef293144d0 (diff)
downloadelgg-ad745e050da855d326d1b6bc3df8032c05574392.tar.gz
elgg-ad745e050da855d326d1b6bc3df8032c05574392.tar.bz2
Moved toolbar dropdown menu to main nav.
Added CSS for main nav dropdown. Emptied navigation/topbar_tools view. git-svn-id: http://code.elgg.org/elgg/trunk@5455 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php22
1 files changed, 9 insertions, 13 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 0c1bbd83e..7691ca5bb 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2919,18 +2919,14 @@ function elgg_api_test($hook, $type, $value, $params) {
}
/**
- * Sorts out the topbar menu and the featured URLs
- * and saves them to $CONFIG->menu_items = array ('featured_urls' and 'toolbar')
- *
+ * Sorts out the featured URLs and the "more" dropdown
+ * @return array ('featured_urls' and 'more')
*/
-function ui_page_setup() {
- global $CONFIG;
-
- $hide_toolbar_dupes = get_config('menu_items_hide_toolbar_entries') == 'yes' ? TRUE : FALSE;
+function elgg_get_nav_items() {
$menu_items = get_register('menu');
$featured_urls_info = get_config('menu_items_featured_urls');
- $toolbar = array();
+ $more = array();
$featured_urls = array();
$featured_urls_sanitised = array();
@@ -2952,14 +2948,14 @@ function ui_page_setup() {
// add toolbar entries if not hiding dupes.
foreach ($menu_items as $name => $info) {
- if (!($hide_toolbar_dupes && in_array($info->value->url, $featured_urls))) {
- $toolbar[] = $info;
+ if (!in_array($info->value->url, $featured_urls)) {
+ $more[] = $info;
}
}
- $CONFIG->menu_items = array(
- 'featured_urls' => $featured_urls_sanitised,
- 'toolbar' => $toolbar
+ return array(
+ 'featured' => $featured_urls_sanitised,
+ 'more' => $more
);
}