Merge pull request #231 from marc1706/ticket/229
[ticket/229] Display all groups in who is online module
This commit is contained in:
@@ -95,7 +95,7 @@ class whois_online extends module_base
|
|||||||
{
|
{
|
||||||
$sql = 'SELECT group_id, group_name, group_colour, group_type
|
$sql = 'SELECT group_id, group_name, group_colour, group_type
|
||||||
FROM ' . GROUPS_TABLE . '
|
FROM ' . GROUPS_TABLE . '
|
||||||
WHERE group_legend = 1
|
WHERE group_legend > 0
|
||||||
ORDER BY group_name ASC';
|
ORDER BY group_name ASC';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -108,7 +108,7 @@ class whois_online extends module_base
|
|||||||
AND ug.user_id = ' . $this->user->data['user_id'] . '
|
AND ug.user_id = ' . $this->user->data['user_id'] . '
|
||||||
AND ug.user_pending = 0
|
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 = ' . $this->user->data['user_id'] . ')
|
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $this->user->data['user_id'] . ')
|
||||||
ORDER BY g.group_name ASC';
|
ORDER BY g.group_name ASC';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,4 +97,13 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
$this->logout();
|
$this->logout();
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
$crawler = self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_whois_online_legend()
|
||||||
|
{
|
||||||
|
$crawler = self::request('GET', 'app.php/portal');
|
||||||
|
|
||||||
|
$legend = $crawler->filter('dd.portal-responsive-show p em')->text();
|
||||||
|
$this->assertContains('Administrators', $legend);
|
||||||
|
$this->assertContains('Global moderators', $legend);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user