diff options
author | thomascube <thomas@roundcube.net> | 2008-09-25 13:51:24 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-09-25 13:51:24 +0000 |
commit | bb8781c6d756c76c65e3cdce4f53bf9cca2f9193 (patch) | |
tree | 815e101c3301d6b5841de5878c603945307d9ac3 /program/steps/addressbook | |
parent | cefd1d8c913aa81ddce83e9de7f5bfb22aa4b2d9 (diff) |
Improve vcard decoding and import step
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r-- | program/steps/addressbook/import.inc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc index a0786e214..93452eccd 100644 --- a/program/steps/addressbook/import.inc +++ b/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, |