Formatting

This commit is contained in:
Miles Lott 2005-09-29 11:31:02 +00:00
parent c5f0daa001
commit eefec39e13

View File

@ -433,12 +433,12 @@
{ {
// don't search about any fields any more // don't search about any fields any more
$search_filter = array( $search_filter = array(
'fn' => 'cn', 'fn' => 'cn',
'n_given' => 'givenname', 'n_given' => 'givenname',
'n_family' => 'sn', 'n_family' => 'sn',
'email' => 'mail', 'email' => 'mail',
'org_name' => 'o', 'org_name' => 'o',
'org_unit' => 'ou' 'org_unit' => 'ou'
); );
$myfilter = $this->makefilter($filterfields,$search_filter,$GLOBALS['egw']->common->ldap_addslashes($query),$DEBUG); $myfilter = $this->makefilter($filterfields,$search_filter,$GLOBALS['egw']->common->ldap_addslashes($query),$DEBUG);
} }
@ -460,17 +460,20 @@
/* Use usort to sort the complete result, since ldap_search can not do that */ /* Use usort to sort the complete result, since ldap_search can not do that */
@set_time_limit(0); /* Try not to die, this can take some time on slow machines... */ @set_time_limit(0); /* Try not to die, this can take some time on slow machines... */
if (empty($order)) { if(empty($order))
{
$order_array = 'array("' $order_array = 'array("'
. $this->stock_contact_fields['n_family'] . '", "' . $this->stock_contact_fields['n_family'] . '", "'
. $this->stock_contact_fields['n_given'] . '", "' . $this->stock_contact_fields['n_given'] . '", "'
. $this->stock_contact_fields['email'] . '")'; . $this->stock_contact_fields['email'] . '")';
} else { }
else
{
$order_array = "array('" $order_array = "array('"
. $this->stock_contact_fields[$order] . "','" . $this->stock_contact_fields[$order] . "','"
. $this->stock_contact_fields['n_family'] . "', '" . $this->stock_contact_fields['n_family'] . "', '"
. $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 # a little bit of functional programming
$function = 'return contacts::_cmp(' . $order_array . ",'" . $sort . "'," . '$a, $b);'; $function = 'return contacts::_cmp(' . $order_array . ",'" . $sort . "'," . '$a, $b);';