thomascube
2008-09-25 bb8781c6d756c76c65e3cdce4f53bf9cca2f9193
program/steps/addressbook/import.inc
@@ -116,7 +116,7 @@
    $IMPORT_STATS = new stdClass;
    $IMPORT_STATS->names = array();
    $IMPORT_STATS->count = count($vcards);
    $IMPORT_STATS->inserted = $IMPORT_STATS->skipped = $IMPORT_STATS->errors = 0;
    $IMPORT_STATS->inserted = $IMPORT_STATS->skipped = $IMPORT_STATS->nomail = $IMPORT_STATS->errors = 0;
    
    if ($replace)
      $CONTACTS->delete_all();
@@ -124,6 +124,12 @@
    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);