forked from extern/egroupware
fix an usort sideeffect
This commit is contained in:
parent
42e14d2cfd
commit
7ae0075fb3
@ -475,7 +475,9 @@
|
|||||||
. $this->stock_contact_fields['n_given'] . "', '"
|
. $this->stock_contact_fields['n_given'] . "', '"
|
||||||
. $this->stock_contact_fields['email'] . "')";
|
. $this->stock_contact_fields['email'] . "')";
|
||||||
}
|
}
|
||||||
# a little bit of functional programming
|
# remove the "count" field from the array, because usort screws up associative arrays
|
||||||
|
unset($ldap_fields['count']);
|
||||||
|
# sort the array
|
||||||
$function = 'return contacts::_cmp(' . $order_array . ",'" . $sort . "'," . '$a, $b);';
|
$function = 'return contacts::_cmp(' . $order_array . ",'" . $sort . "'," . '$a, $b);';
|
||||||
usort($ldap_fields, create_function('$a, $b', $function));
|
usort($ldap_fields, create_function('$a, $b', $function));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user