You are here

function _aat_legacy_migrate_fields_finished in Amazon Product Advertisement API 6

Batch 'finished' callback

1 string reference to '_aat_legacy_migrate_fields_finished'
aat_legacy_import_data in aat_legacy/aat_legacy.module
Create a CCK field for each node type that had Amazon link in D5. Then populate it.

File

aat_legacy/aat_legacy.d5-migrate.inc, line 27
Migration for the amazonnode and related item links from D5 amazontools.

Code

function _aat_legacy_migrate_fields_finished($success, $results, $operations) {
  if ($success) {
    $message = t('%count legacy fields (amazonnodes and links) were imported.', array(
      '%count' => count($results),
    ));
    $message .= theme('item_list', $results);
  }
  else {

    // An error occurred.
    // $operations contains the operations that remained unprocessed.
    $error_operation = reset($operations);
    $message = t('An error occurred while processing %op.  with arguments = %args.', array(
      '%op' => $error_operation[0],
      '%args' => print_r($error_operation[0], TRUE),
    ));
  }
  drupal_set_message($message);
}