Changeset 3715 in subversion
- Timestamp:
- Jun 4, 2010 7:51:50 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/mail/autocomplete.inc
r3609 r3715 38 38 else if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_GPC, true)) { 39 39 $contacts = array(); 40 $books_num = count($book_types); 40 41 41 42 foreach ($book_types as $id) { … … 45 46 if ($result = $abook->search(array('email','name'), $search, false, true, true, 'email')) { 46 47 while ($sql_arr = $result->iterate()) { 47 $contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']); 48 $contact = format_email_recipient($sql_arr['email'], $sql_arr['name']); 49 // when we've got more than one book, we need to skip duplicates 50 if ($books_num == 1 || !in_array($contact, $contacts)) { 51 $contacts[] = $contact; 48 52 if (count($contacts) >= $MAXNUM) 49 53 break 2; 54 } 50 55 } 51 56 }
Note: See TracChangeset
for help on using the changeset viewer.
