SF Bug #3139097 - Argument for PickList sorting does not work
This commit is contained in:
parent
d5c8d42adc
commit
bf8ac5306e
@ -2878,7 +2878,6 @@ function binSIDtoText($binsid) {
|
||||
* or true to have the returned array sorted by DN (uses ksort)
|
||||
* or an array of attribute names to sort by attribute values
|
||||
* @return array Array of values keyed by $key.
|
||||
* @todo sort is not being performed
|
||||
*/
|
||||
function return_ldap_hash($base,$filter,$key,$attrs,$sort=true) {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
@ -2919,6 +2918,9 @@ function return_ldap_hash($base,$filter,$key,$attrs,$sort=true) {
|
||||
$results[$values[$key]][$attr] = $values[$lattr];
|
||||
}
|
||||
|
||||
if ($sort)
|
||||
masort($results,is_array($sort) ? implode(',',$sort) : 'dn');
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user