diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-18 09:40:43 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-18 09:40:43 +0000 |
commit | 6ed3c77c05c2cf6e16f0b65f818c50b0a6d9bee8 (patch) | |
tree | 1e34b4b954bafa701dd8081c6587d117cd5f1b07 /engine/lib | |
parent | bd87ee1abd2aaf9f60061d6f505f64c4f313bf03 (diff) | |
download | elgg-6ed3c77c05c2cf6e16f0b65f818c50b0a6d9bee8.tar.gz elgg-6ed3c77c05c2cf6e16f0b65f818c50b0a6d9bee8.tar.bz2 |
More submenu corrections
git-svn-id: https://code.elgg.org/elgg/trunk@1999 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/elgglib.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 9fc3e65f2..114698ad3 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -557,9 +557,6 @@ ksort($submenu_register);
foreach($submenu_register as $groupname => $submenu_register_group) {
-
- $submenu = "";
-
foreach($submenu_register_group as $key => $item) {
if (substr_count($item->value, $_SERVER['REQUEST_URI'])) {
@@ -567,22 +564,29 @@ if ($comparevals[$key] < $maxcompareval) {
$maxcompareval = $comparevals[$key];
$preselected = $key;
+ $preselectedgroup = $groupname;
}
}
}
+ }
+
+ foreach($submenu_register as $groupname => $submenu_register_group) {
+
+ $submenu = "";
foreach($submenu_register_group as $key => $item) {
if ($preselected === false) {
if (substr_count($item->value, $_SERVER['REQUEST_URI'])) {
$preselected = $key;
+ $preselectedgroup = $groupname;
$selected = true;
} else {
$selected = false;
}
} else {
- if ($key == $preselected) {
+ if ($key == $preselected && $groupname == $preselectedgroup) {
$selected = true;
} else {
$selected = false;
|