add option to sort users and Characters by registration date
This commit is contained in:
parent
1578654cb1
commit
6df13cb5b4
7 changed files with 88 additions and 32 deletions
|
|
@ -716,6 +716,24 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compare two Characters by their registration date.
|
||||
*
|
||||
* @param array $a Character a
|
||||
* @param array $b Character b
|
||||
* @return int Result of comparison
|
||||
*/
|
||||
private function sortCharactersByDate($a, $b)
|
||||
{
|
||||
if($a['created'] == $b['created']) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return ($a['created'] > $b['created']) ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compare two Characters by one of their Seminary fields.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue