diff options
author | Aleksander Machniak <alec@alec.pl> | 2015-02-25 09:22:54 -0500 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2015-02-25 09:24:14 -0500 |
commit | 83f1f6b12fb5405ca598322e09b3ccd0842ccc85 (patch) | |
tree | dc9cdc62568043cbf58a1af86fdf72d74204773e /program/lib/Roundcube | |
parent | 97ee4c40c1e575efb7193fabd32a9d897673f8e2 (diff) |
Improve compose_search_name() to not return "email@address <email@address>" entries
which may happen for contacts without name(s)
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r-- | program/lib/Roundcube/rcube_addressbook.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php index 69f8bf934..31189e0fc 100644 --- a/program/lib/Roundcube/rcube_addressbook.php +++ b/program/lib/Roundcube/rcube_addressbook.php @@ -594,6 +594,13 @@ abstract class rcube_addressbook switch ($key) { case 'name': $value = $name ?: self::compose_list_name($contact); + + // If name(s) are undefined compose_list_name() may return an email address + // here we prevent from returning the same name and email + if ($name === $email && strpos($result, '{email}') !== false) { + $value = ''; + } + break; case 'email': |