diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-14 15:56:42 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-14 15:56:42 +0000 |
commit | dfe63b48a4473f2f3d72e10a446fc3c0f3312a34 (patch) | |
tree | d743af8e70b6a489cb31c51230300e774edab6d6 /engine | |
parent | 04ac6b7e56e0681d55370d11184a0f310c944ede (diff) | |
download | elgg-dfe63b48a4473f2f3d72e10a446fc3c0f3312a34.tar.gz elgg-dfe63b48a4473f2f3d72e10a446fc3c0f3312a34.tar.bz2 |
Fixed an issue with the submenu.
git-svn-id: https://code.elgg.org/elgg/trunk@1923 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/elgglib.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index a367707b3..06bc9540a 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -561,17 +561,19 @@ foreach($submenu_register_group as $key => $item) {
- $comparevals[$key] = (levenshtein($item->value, $_SERVER['REQUEST_URI']));
- if ($comparevals[$key] < $maxcompareval) {
- $maxcompareval = $comparevals[$key];
- $preselected = $key;
+ if (substr_count($item->value, $_SERVER['REQUEST_URI'])) {
+ $comparevals[$key] = levenshtein($item->value, $_SERVER['REQUEST_URI']);
+ if ($comparevals[$key] < $maxcompareval) {
+ $maxcompareval = $comparevals[$key];
+ $preselected = $key;
+ }
}
}
foreach($submenu_register_group as $key => $item) {
- if (!$preselected) {
+ if ($preselected === false) {
if (substr_count($item->value, $_SERVER['REQUEST_URI'])) {
$selected = true;
} else {
|