Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete should filter out duplicates #4776

Closed
rcubetrac opened this issue Feb 25, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@rcubetrac
Copy link

commented Feb 25, 2015

Reported by rosali on 25 Feb 2015 05:31 UTC as Trac ticket #1490290

Duplicate addresses in autocomplete search results should be filtered.

Supposed fix in ./program/steps/mail/autocomplete.inc at bottom:

$filtered = array();
foreach ($contacts as $idx => $contact) {
  $filtered[strtolower($contact['name'])] = $contact;
}
$OUTPUT->command('ksearch_query_results', array_values($filtered), $search, $reqid);
$OUTPUT->send();

Migrated-From: http://trac.roundcube.net/ticket/1490290

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 25, 2015

Comment by @alecpl on 25 Feb 2015 16:29 UTC

There is already a code to skip duplicates:

    // skip duplicates
    if (!in_array($contact, $contacts)) {

but it does not work since $contact is an array. It also does not take groups into consideration.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 25, 2015

Comment by @alecpl on 25 Feb 2015 17:03 UTC

Fixed in e1c8fe5.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 25, 2015

Status changed by @alecpl on 25 Feb 2015 17:03 UTC

new => closed

@rcubetrac rcubetrac closed this Feb 25, 2015

@rcubetrac rcubetrac added this to the 1.1.1 milestone Mar 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.