Fix bug where contacts search could skip some records (#6130)

pull/6136/head
Aleksander Machniak 7 years ago
parent 64ad87468a
commit ce338164e3

@ -62,6 +62,7 @@ CHANGELOG Roundcube Webmail
- Fix touch event issue on messages list in IE/Edge (#5781) - Fix touch event issue on messages list in IE/Edge (#5781)
- Fix so links over images are not removed in plain text signatures converted from HTML (#4473) - Fix so links over images are not removed in plain text signatures converted from HTML (#4473)
- Fix various issues when downloading files with names containing non-ascii chars, use RFC 2231 (#5772) - Fix various issues when downloading files with names containing non-ascii chars, use RFC 2231 (#5772)
- Fix bug where contacts search could skip some records (#6130)
RELEASE 1.3.4 RELEASE 1.3.4
------------- -------------

@ -654,13 +654,16 @@ abstract class rcube_addressbook
*/ */
public static function compose_contact_key($contact, $sort_col) public static function compose_contact_key($contact, $sort_col)
{ {
$key = $contact[$sort_col] . ':' . $contact['sourceid']; $key = $contact[$sort_col];
// add email to a key to not skip contacts with the same name (#1488375) // add email to a key to not skip contacts with the same name (#1488375)
if (($email = self::get_col_values('email', $contact, true)) && !empty($email)) { if (($email = self::get_col_values('email', $contact, true)) && !empty($email)) {
$key .= ':' . implode(':', (array)$email); $key .= ':' . implode(':', (array)$email);
} }
// Make the key really unique (as we e.g. support contacts with no email)
$key .= ':' . $contact['sourceid'] . ':' . $contact['ID'];
return $key; return $key;
} }

Loading…
Cancel
Save