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

Conflicts:
	CHANGELOG
pull/6465/head
Aleksander Machniak 8 years ago
parent 917ae1c199
commit 2eeb2c75df

@ -1,6 +1,8 @@
CHANGELOG Roundcube Webmail
===========================
- Fix bug where contacts search could skip some records (#6130)
RELEASE 1.3.4
-------------
- Fix a couple of warnings on PHP 7.2 (#6098)

@ -654,13 +654,16 @@ abstract class rcube_addressbook
*/
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)
if (($email = self::get_col_values('email', $contact, true)) && !empty($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;
}

Loading…
Cancel
Save