Aleksander Machniak
2015-02-25 f129972361ce9f6b76568d0a033c341dfac18ecc
Improve compose_search_name() to not return "email@address <email@address>" entries
which may happen for contacts without name(s)
1 files modified
7 ■■■■■ changed files
program/lib/Roundcube/rcube_addressbook.php 7 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_addressbook.php
@@ -594,6 +594,13 @@
                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':