summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-25 13:51:24 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-25 13:51:24 +0000
commite9f48d91f1a668810c5511c9b6361c1ed5ada443 (patch)
treecfd998cf7f1f2f9abbb229cd476682b6ad416f86 /roundcubemail/program/steps
parent2bb3c3754e86f5ef93ed9227fa2b461f1044f1a4 (diff)
Improve vcard decoding and import step
git-svn-id: https://svn.roundcube.net/trunk@1891 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/addressbook/import.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/roundcubemail/program/steps/addressbook/import.inc b/roundcubemail/program/steps/addressbook/import.inc
index a0786e214..93452eccd 100644
--- a/roundcubemail/program/steps/addressbook/import.inc
+++ b/roundcubemail/program/steps/addressbook/import.inc
@@ -124,6 +124,12 @@ if ($_FILES['_file']['tmp_name'] && is_uploaded_file($_FILES['_file']['tmp_name'
foreach ($vcards as $vcard) {
$email = $vcard->email[0];
+ // skip entries without an e-mail address
+ if (empty($email)) {
+ $IMPORT_STATS->nomail++;
+ continue;
+ }
+
if (!$replace) {
// compare e-mail address
$existing = $CONTACTS->search('email', $email, false, false);
@@ -135,11 +141,6 @@ if ($_FILES['_file']['tmp_name'] && is_uploaded_file($_FILES['_file']['tmp_name'
continue;
}
}
- // skip entries without an e-mail address
- if (empty($email)) {
- $IMPORT_STATS->nomail++;
- continue;
- }
$success = $CONTACTS->insert(array(
'name' => $vcard->displayname,