diff options
author | thomascube <thomas@roundcube.net> | 2009-05-15 10:22:29 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2009-05-15 10:22:29 +0000 |
commit | 51ede06434097ef8d0697ee204fa998d6445d194 (patch) | |
tree | 76d6362bca66010776af8e8fbb971ba848cc3215 /program/steps/mail/autocomplete.inc | |
parent | 9bee4437b889f4e36e37116ebf1fc24765eecad6 (diff) |
Apply changes from r2348 to r2400 for 0.2.2 release
Diffstat (limited to 'program/steps/mail/autocomplete.inc')
-rw-r--r-- | program/steps/mail/autocomplete.inc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index 26acc88c2..b1aba7d62 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -19,7 +19,7 @@ */ -$MAXNUM = 15; // same limit as in app.js +$MAXNUM = 15; $contacts = array(); $book_types = (array) $RCMAIL->config->get('autocomplete_addressbooks', 'sql'); @@ -33,12 +33,11 @@ if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_POST)) { while ($sql_arr = $result->iterate()) { if (stripos((string)$sql_arr['email'], $search) !== false || stripos((string)$sql_arr['name'], $search) !== false) { $contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']); + if (count($contacts) >= $MAXNUM) + break 2; } } } - - if (count($contacts) >= $MAXNUM) - break; } sort($contacts); |