aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-31 10:47:06 -0500
committercash <cash.costello@gmail.com>2011-12-31 10:47:06 -0500
commitc49f6d145700c878851ed6b548674d7693238841 (patch)
tree63f3ae96c52f428ab9d8c15a553fdf7ecb6cd413 /mod/groups/views/default
parent0647c4f8b6e50f93450939ecd2260f44fd3da115 (diff)
downloadelgg-c49f6d145700c878851ed6b548674d7693238841.tar.gz
elgg-c49f6d145700c878851ed6b548674d7693238841.tar.bz2
Fixes #4228 group sort menu view accepts selected menu item from page handler
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/groups/group_sort_menu.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php
index c53b49c8e..f5631a31f 100644
--- a/mod/groups/views/default/groups/group_sort_menu.php
+++ b/mod/groups/views/default/groups/group_sort_menu.php
@@ -2,6 +2,7 @@
/**
* All groups listing page navigation
*
+ * @uses $vars['selected'] Name of the tab that has been selected
*/
$tabs = array(
@@ -22,14 +23,13 @@ $tabs = array(
),
);
-// sets default selected item
-if (strpos(full_url(), 'filter') === false) {
- $tabs['newest']['selected'] = true;
-}
-
foreach ($tabs as $name => $tab) {
$tab['name'] = $name;
+ if ($vars['selected'] == $name) {
+ $tab['selected'] = true;
+ }
+
elgg_register_menu_item('filter', $tab);
}