diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-13 17:51:28 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-13 17:51:28 +0000 |
| commit | f4938a7920c149bb3298298880530b514c99772f (patch) | |
| tree | fc7eb987e507d2a787a9f1aaa057e6608595095b /roundcubemail/program/include | |
| parent | f2c1c5270cdf233869294c926f847f94832ebe14 (diff) | |
Fix empty name in search results and error when creating a new contact
git-svn-id: https://svn.roundcube.net/trunk@4764 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_contacts.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_contacts.php b/roundcubemail/program/include/rcube_contacts.php index 8abc76302..e7c078f7e 100644 --- a/roundcubemail/program/include/rcube_contacts.php +++ b/roundcubemail/program/include/rcube_contacts.php @@ -200,10 +200,13 @@ class rcube_contacts extends rcube_addressbook $sql_arr = $this->convert_db_data($sql_arr); else $sql_arr['email'] = preg_split('/,\s*/', $sql_arr['email']); - + // make sure we have a name to display - if (empty($sql_arr['name'])) + if (empty($sql_arr['name'])) { + if (empty($sql_arr['email'])) + $sql_arr['email'] = $this->get_col_values('email', $sql_arr, true); $sql_arr['name'] = $sql_arr['email'][0]; + } $this->result->add($sql_arr); } |
