You are here

function data_export_import_batch_import_dataset_lines_finished in Data export import 7

Same name and namespace in other branches
  1. 6 includes/profiles/all_content_types.inc \data_export_import_batch_import_dataset_lines_finished()

Batch 'finished' callback.

1 string reference to 'data_export_import_batch_import_dataset_lines_finished'
data_export_import_import_nodes in includes/profiles/nodes.inc
Import a dataset file and make current nodes match exactly.

File

includes/profiles/nodes.inc, line 1086
Enables nodes to be exported and imported.

Code

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

    // Here we do something meaningful with the results.
    $message = "The following file was imported:";
    $message .= theme('item_list', array(
      'items' => $results,
    ));
  }
  else {

    // An error occurred. NB that $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);
}