_mediamosa_migration_batch_finished

Versions
mediamosa-21
_mediamosa_migration_batch_finished($success, $results, $operations)
  • 'finished' callback

Code

sites/all/modules/mediamosa_migration/mediamosa_migration.admin.inc, line 157

<?php
function _mediamosa_migration_batch_finished($success, $results, $operations) {
  if ($success) {
    // Here we do something meaningful with the results.
    $message = count($results) . ' processed.';
    $message .= theme('item_list', $results);

    // Mark that migration was successful.
    variable_set('mediamosa_migration_status', 'done');
  }
  else {
    // An error occurred.
    // $operations contains the operations that remained unprocessed.
    $error_operation = reset($operations);
    $message = t('An error occurred while processing %error_operation with arguments: @arguments', array('%error_operation' => $error_operation[0], '@arguments' => print_r($error_operation[1], TRUE)));
  }
  drupal_set_message($message);
}
?>