mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 11:23:54 +01:00
* LDAP/ActiveDirectory: fix sorting accounts by anything other then account-name fails
This commit is contained in:
parent
96bcda7433
commit
bff3b0215e
@ -943,6 +943,10 @@ class Ads
|
||||
// sort the array
|
||||
$this->_callback_sort = strtoupper($param['sort']);
|
||||
$this->_callback_order = empty($param['order']) ? array('account_lid') : explode(',',$param['order']);
|
||||
foreach($this->_callback_order as &$col)
|
||||
{
|
||||
if (substr($col, 0, 8) !== 'account_') $col = 'account_'.$col;
|
||||
}
|
||||
$sortedAccounts = $accounts;
|
||||
uasort($sortedAccounts,array($this,'_sort_callback'));
|
||||
$account_search[$unl_serial]['data'] = $sortedAccounts;
|
||||
|
@ -853,6 +853,10 @@ class Ldap
|
||||
// sort the array
|
||||
$this->_callback_sort = strtoupper($param['sort']);
|
||||
$this->_callback_order = empty($param['order']) ? array('account_lid') : explode(',',$param['order']);
|
||||
foreach($this->_callback_order as &$col)
|
||||
{
|
||||
if (substr($col, 0, 8) !== 'account_') $col = 'account_'.$col;
|
||||
}
|
||||
$sortedAccounts = $accounts;
|
||||
uasort($sortedAccounts,array($this,'_sort_callback'));
|
||||
$this->total = isset($totalcount) ? $totalcount : count($accounts);
|
||||
|
Loading…
Reference in New Issue
Block a user