You are here

function word_link_exchange_export_batch_finish in Word Link 7

Same name and namespace in other branches
  1. 8 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_export_batch_finish()
  2. 7.2 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_export_batch_finish()

Batch export finish.

1 string reference to 'word_link_exchange_export_batch_finish'
word_link_exchange_export_form_submit in modules/word_link_exchange/word_link_exchange.module
Submit for export form.

File

modules/word_link_exchange/word_link_exchange.module, line 588
Code for the Word link exchange module.

Code

function word_link_exchange_export_batch_finish($success, $results, $operations) {
  if (empty($results['total'])) {
    $message = t('There is nothing to export.');
  }
  elseif ($success && !empty($results['total'])) {
    $file = $results['file'];
    $message = t('@count words have been exported to file !link (!filesize). Click on link to view it or right click to download it.', array(
      '@count' => count($results['total']),
      '!link' => l($file->filename, file_create_url(file_build_uri($file->filename))),
      '!filesize' => format_size(filesize($file->filepath)),
    ));
  }
  else {
    $message = t('Finished with an error.');
  }
  drupal_set_message($message);
}