aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/menu
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-08-25 10:00:38 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-08-25 10:00:38 -0700
commitdccc333c765bb28da55b4a55d9c916acdb88413a (patch)
treebdd26a0b4cd85241a19b7fcb2c0770f0ac3eb9f0 /views/default/navigation/menu
parentec7b94a64aef23b85866ecdac8e8acc712d29bb6 (diff)
parent003cb81c7888f4d2fd763e5814027c6f8d71186f (diff)
downloadelgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.gz
elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.bz2
Merge branch 'master' of github.com:brettp/Elgg
Diffstat (limited to 'views/default/navigation/menu')
-rw-r--r--views/default/navigation/menu/default.php2
-rw-r--r--views/default/navigation/menu/elements/item.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/views/default/navigation/menu/default.php b/views/default/navigation/menu/default.php
index 0dc6dd6b3..0fa391433 100644
--- a/views/default/navigation/menu/default.php
+++ b/views/default/navigation/menu/default.php
@@ -9,7 +9,7 @@
*/
// we want css classes to use dashes
-$vars['name'] = str_replace('_', '-', $vars['name']);
+$vars['name'] = preg_replace('/[^a-z0-9\-]/i', '-', $vars['name']);
$headers = elgg_extract('show_section_headers', $vars, false);
$class = "elgg-menu elgg-menu-{$vars['name']}";
diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php
index f3e46315b..5d6a7e367 100644
--- a/views/default/navigation/menu/elements/item.php
+++ b/views/default/navigation/menu/elements/item.php
@@ -16,8 +16,8 @@ if ($item->getSelected()) {
$children = $item->getChildren();
if ($children) {
- $item->setLinkClass($link_class);
- $item->setLinkClass('elgg-menu-parent');
+ $item->addLinkClass($link_class);
+ $item->addLinkClass('elgg-menu-parent');
}
$item_class = $item->getItemClass();