diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-13 18:08:37 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-13 18:08:37 +0000 |
| commit | 7584077db7ee79d58df5021bb689a7deaae04cbb (patch) | |
| tree | 14fa7911d5440b0e1032f0232677cf2235161721 /roundcubemail/program/steps | |
| parent | f4938a7920c149bb3298298880530b514c99772f (diff) | |
Correctly handle empty contact names when importing
git-svn-id: https://svn.roundcube.net/trunk@4765 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/addressbook/import.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/addressbook/import.inc b/roundcubemail/program/steps/addressbook/import.inc index e20fbe082..4583be508 100644 --- a/roundcubemail/program/steps/addressbook/import.inc +++ b/roundcubemail/program/steps/addressbook/import.inc @@ -156,12 +156,12 @@ if ($_FILES['_file']['tmp_name'] && is_uploaded_file($_FILES['_file']['tmp_name' if (!$replace && $email) { // compare e-mail address $existing = $CONTACTS->search('email', $email, false, false); - if (!$existing->count) { // compare display name + if (!$existing->count && $vcard->displayname) { // compare display name $existing = $CONTACTS->search('name', $vcard->displayname, false, false); } if ($existing->count) { $IMPORT_STATS->skipped++; - $IMPORT_STATS->skipped_names[] = $vcard->displayname; + $IMPORT_STATS->skipped_names[] = $vcard->displayname ? $vcard->displayname : $email; continue; } } @@ -180,7 +180,7 @@ if ($_FILES['_file']['tmp_name'] && is_uploaded_file($_FILES['_file']['tmp_name' if ($success) { $IMPORT_STATS->inserted++; - $IMPORT_STATS->names[] = $vcard->displayname; + $IMPORT_STATS->names[] = $vcard->displayname ? $vcard->displayname : $email; } else { $IMPORT_STATS->errors++; } |
