Update version 0.0.10

Update version 0.0.10
This commit is contained in:
dmzx
2015-03-25 21:28:31 +01:00
parent f4bd26374e
commit 1a55e87340
5 changed files with 21 additions and 8 deletions

View File

@@ -889,20 +889,21 @@ class render_helper
if ($this->config_mchat['whois'])
{
// Grab group details for legend display for who is online on the custom page.
$order_legend = ($this->config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
if ($this->auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql = 'SELECT group_id, group_name, group_colour, group_type FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
ORDER BY group_name ASC';
WHERE group_legend <> 0
ORDER BY ' . $order_legend . ' ASC';
}
else
{
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (g.group_id = ug.group_id AND ug.user_id = ' . $this->user->data['user_id'] . ' AND ug.user_pending = 0)
WHERE g.group_legend = 1
WHERE g.group_legend <> 0
AND (g.group_type <> ' . GROUP_HIDDEN . '
OR ug.user_id = ' . (int) $this->user->data['user_id'] . ')
ORDER BY g.group_name ASC';
ORDER BY g.' . $order_legend . ' ASC';
}
$result = $this->db->sql_query($sql);
$legend = array();