Commit 02ebd10a authored by Hugh Davenport's avatar Hugh Davenport
Browse files

List group members alphabetically



The order before used to be join time, first, last. Changed to
first, last, join time.
There is also an option to set the order to latest for the
groupmembers blockinstance (group home page). This will have
the order join, first, last.

Bug #707860

Change-Id: I41a4ff0b0bd340b5b736958925b8096232c08fbb
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent 5b02c400
......@@ -404,7 +404,7 @@ class PluginSearchInternal extends PluginSearch {
WHERE u.id > 0 AND u.deleted = 0 ' . $searchsql . '
AND gmr.group = ?';
$values[] = $group;
$orderby = 'gmr.ctime, u.firstname, u.lastname, u.id';
$orderby = 'u.firstname, u.lastname, gmr.ctime, u.id';
}
else if ($membershiptype == 'invite') {
$select = '
......@@ -416,7 +416,7 @@ class PluginSearchInternal extends PluginSearch {
WHERE u.id > 0 AND u.deleted = 0 ' . $searchsql . '
AND gmi.group = ?';
$values[] = $group;
$orderby = 'gmi.ctime, u.firstname, u.lastname, u.id';
$orderby = 'u.firstname, u.lastname, gmi.ctime, u.id';
}
else { // All group members
$select = '
......@@ -428,7 +428,7 @@ class PluginSearchInternal extends PluginSearch {
WHERE u.id > 0 AND u.deleted = 0 ' . $searchsql . '
AND gm.group = ?';
$values[] = $group;
$orderby = "gm.role = 'admin' DESC, gm.ctime, u.firstname, u.lastname, u.id";
$orderby = "gm.role = 'admin' DESC, u.firstname, u.lastname, gm.ctime, u.id";
if ($order == 'latest') {
$orderby = 'gm.ctime DESC, u.firstname, u.lastname, u.id';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment