[ticket/452] Correctly select groups selected for displayal in legend

B3P-452
This commit is contained in:
Marc Alexander
2015-02-01 01:12:59 +01:00
parent 12947c612f
commit 44fae8c7cb

View File

@@ -101,7 +101,7 @@ class leaders extends module_base
{
$sql = 'SELECT group_id, group_name, group_colour, group_type
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
WHERE group_legend >= 1
ORDER BY group_name ASC';
}
else
@@ -114,7 +114,7 @@ class leaders extends module_base
AND ug.user_id = ' . $this->user->data['user_id'] . '
AND ug.user_pending = 0
)
WHERE g.group_legend = 1
WHERE g.group_legend >= 1
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $this->user->data['user_id'] . ')
ORDER BY g.group_name ASC';
}