mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
ed12ddb573
|
@ -808,6 +808,44 @@ function createNonce() { /* {{{ */
|
||||||
return base64_encode($bytes);
|
return base64_encode($bytes);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare function for sorting users by login
|
||||||
|
*
|
||||||
|
* Use this for usort()
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* $users = $dms->getAllUsers();
|
||||||
|
* usort($users, 'cmp_user_login');
|
||||||
|
* </code>
|
||||||
|
*/
|
||||||
|
function cmp_user_login($a, $b) { /* {{{ */
|
||||||
|
$as = strtolower($a->getLogin());
|
||||||
|
$bs = strtolower($b->getLogin());
|
||||||
|
if ($as == $bs) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ($as < $bs) ? -1 : 1;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare function for sorting users by name
|
||||||
|
*
|
||||||
|
* Use this for usort()
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* $users = $dms->getAllUsers();
|
||||||
|
* usort($users, 'cmp_user_fullname');
|
||||||
|
* </code>
|
||||||
|
*/
|
||||||
|
function cmp_user_fullname($a, $b) { /* {{{ */
|
||||||
|
$as = strtolower($a->getFullName());
|
||||||
|
$bs = strtolower($b->getFullName());
|
||||||
|
if ($as == $bs) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ($as < $bs) ? -1 : 1;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the mandatory reviewers
|
* Returns the mandatory reviewers
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user