aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-08 03:54:25 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-08 03:54:25 +0000
commitb55d0098a07875d4b716c572cede1de9800c7097 (patch)
tree52b5fab46ef4f9e86bf04120234ef437afa72b7b /engine/lib
parentaa011b14603ba807121c811399685895a9c75d67 (diff)
downloadelgg-b55d0098a07875d4b716c572cede1de9800c7097.tar.gz
elgg-b55d0098a07875d4b716c572cede1de9800c7097.tar.bz2
Not setting $item->selected on a submenu item acts the same as setting it to NULL for selected state guessing.
Removed unused code in submenu system. git-svn-id: http://code.elgg.org/elgg/trunk@5983 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php14
1 files changed, 1 insertions, 13 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 16ace68be..1c0d1cfc1 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1130,9 +1130,6 @@ function elgg_get_submenu($context = NULL, $sort = FALSE) {
$groups = $CONFIG->submenu[$context];
$submenu_html = '';
- // the guessed selected item.
- $auto_selected = NULL;
-
foreach ($groups as $group => $items) {
// how far down we are in children arrays
$depth = 0;
@@ -1148,7 +1145,7 @@ function elgg_get_submenu($context = NULL, $sort = FALSE) {
}
// try to guess if this should be selected if they don't specify
- if ($item->selected === NULL && isset($item->url)) {
+ if ((!isset($item->selected) || $item->selected === NULL) && isset($item->url)) {
$item->selected = elgg_http_url_is_identical($_SERVER['REQUEST_URI'], $item->url);
}
@@ -1165,15 +1162,6 @@ function elgg_get_submenu($context = NULL, $sort = FALSE) {
}
}
- $item->depth = $depth;
-//
-// for ($i=0; $i<$depth; $i++) {
-// $t .= " - ";
-// }
-//
-// var_dump("$t{$item->text} -> {$item->url} {$item->selected}");
-
-
// get the next item
if (isset($item->children) && $item->children) {
$depth++;