aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/navigation.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 19:22:35 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 19:22:35 +0000
commit83ed6a85ef10757d147303b391343994d0d2faf8 (patch)
tree1ca8ba79df9bf0b79d7306f0c40a9a349c6a0ca7 /engine/lib/navigation.php
parent3423daa3784995f25b72ebfb1e17d59f745f9354 (diff)
downloadelgg-83ed6a85ef10757d147303b391343994d0d2faf8.tar.gz
elgg-83ed6a85ef10757d147303b391343994d0d2faf8.tar.bz2
Refs #2463: Added elgg_normalize_url. forward() and add_menu() make use of it
git-svn-id: http://code.elgg.org/elgg/trunk@7194 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/navigation.php')
-rw-r--r--engine/lib/navigation.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index a5b087bd8..beb154f30 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -92,6 +92,10 @@ function elgg_add_submenu_item(array $item, $context = 'all', $group = 'default'
if (!isset($item['text'])) {
return FALSE;
}
+
+ if (!empty($item['href'])) {
+ $item['href'] = elgg_normalize_url($item['href']);
+ }
// we use persistent object properties in the submenu
// setup function, so normalize the array to an object.
@@ -420,7 +424,7 @@ function add_menu($menu_name, $menu_url, $menu_children = array(), $context = ""
}
$value = new stdClass();
- $value->url = $menu_url;
+ $value->url = elgg_normalize_url($menu_url);
$value->context = $context;
$CONFIG->menucontexts[] = $context;