From: <wo...@us...> - 2005-09-30 16:03:36
|
Update of /cvsroot/egroupware/phpgwapi/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22862/inc Modified Files: class.contacts_ldap.inc.php Log Message: fix an usort sideeffect Index: class.contacts_ldap.inc.php =================================================================== RCS file: /cvsroot/egroupware/phpgwapi/inc/class.contacts_ldap.inc.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** class.contacts_ldap.inc.php 29 Sep 2005 11:31:02 -0000 1.37 --- class.contacts_ldap.inc.php 30 Sep 2005 16:03:27 -0000 1.38 *************** *** 476,480 **** . $this->stock_contact_fields['email'] . "')"; } ! # a little bit of functional programming $function = 'return contacts::_cmp(' . $order_array . ",'" . $sort . "'," . '$a, $b);'; usort($ldap_fields, create_function('$a, $b', $function)); --- 476,482 ---- . $this->stock_contact_fields['email'] . "')"; } ! # 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);'; usort($ldap_fields, create_function('$a, $b', $function)); |