thomascube
2008-09-06 cf1d86d50ea928ae459abcae6d09f8bf2014738f
Don't import contacts without an e-mail address (does not make sense)

1 files modified
7 ■■■■ changed files
program/steps/addressbook/import.inc 7 ●●●● patch | view | raw | blame | history
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();
@@ -135,6 +135,11 @@
          continue;
        }
      }
      // skip entries without an e-mail address
      if (empty($email)) {
        $IMPORT_STATS->nomail++;
        continue;
      }
      
      $success = $CONTACTS->insert(array(
        'name' => $vcard->displayname,