Skip to content

Commit

Permalink
Fix bug where contacts search could skip some records (#6130)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jan 10, 2018
1 parent 64ad874 commit ce33816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CHANGELOG Roundcube Webmail
- 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 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
-------------
Expand Down
5 changes: 4 additions & 1 deletion program/lib/Roundcube/rcube_addressbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -654,13 +654,16 @@ public static function compose_search_name($contact, $email = null, $name = null
*/
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;
}

Expand Down

0 comments on commit ce33816

Please sign in to comment.