You are here

function _asin_migrate_fields_finished in Amazon Product Advertisement API 6

Batch 'finished' callback

1 string reference to '_asin_migrate_fields_finished'
asin_update_6002 in asin/asin.install
Migrate old data from the D5 version.

File

asin/asin.d5-migrate.inc, line 44

Code

function _asin_migrate_fields_finished($success, $results, $operations) {
  if ($success) {

    // Here we do something meaningful with the results.
    $message = count($results) . ' nodes migrated to new ASIN field structure.';
    $message .= theme('item_list', $results);
  }
  else {

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