From 148e7bdf24c8623e60f6d857f7557d3932dca85b Mon Sep 17 00:00:00 2001 From: till Date: Sat, 2 Feb 2008 02:38:37 +0000 Subject: * added an additional check so not everyone "attempts" ldap search if this is not configured (compose.patch did not contain this) --- program/steps/mail/compose.inc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'program') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index c3063e373..89fc9e9bc 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -878,12 +878,13 @@ $CONTACTS->set_pagesize(1000); $a_contacts = array(); if ($result = $CONTACTS->list_records()) -{ + { while ($sql_arr = $result->iterate()) if ($sql_arr['email']) $a_contacts[] = format_email_recipient($sql_arr['email'], JQ($sql_arr['name'])); -} - + } +if (isset($CONFIG['ldap_public'])) { + { /* LDAP autocompletion */ foreach ($CONFIG['ldap_public'] as $ldapserv_config) { @@ -910,12 +911,11 @@ foreach ($CONFIG['ldap_public'] as $ldapserv_config) } $LDAP->close(); - } - - if ($a_contacts) - { + } + } +if ($a_contacts) + { $OUTPUT->set_env('contacts', $a_contacts); - } - + } parse_template('compose'); ?> \ No newline at end of file -- cgit v1.2.3