You are here

function _l10n_update_batch_history in Localization update 7

Same name and namespace in other branches
  1. 6 l10n_update.batch.inc \_l10n_update_batch_history()

Batch process: Update the download history table.

Parameters

$id: Batch id to identify batch results. Result of this batch function are stored in $context['result'] identified by this $id.

$context: Batch context array.

1 string reference to '_l10n_update_batch_history'
l10n_update_batch_multiple in ./l10n_update.batch.inc
Create a big batch for multiple projects and languages.

File

./l10n_update.batch.inc, line 136
Reusable API for creating and running l10n update batches.

Code

function _l10n_update_batch_history($id, &$context) {
  $t = get_t();

  // The batch import is performed in a number of steps. History update is
  // always the last step. The details of the downloaded/imported file are
  // stored in $context['results'] array.
  if (isset($context['results'][$id]['file']) && !isset($context['results'][$id]['fail'])) {
    $file = $context['results'][$id]['file'];
    l10n_update_source_history($file);
    $context['message'] = $t('Imported: %name.', array(
      '%name' => $file->filename,
    ));
  }
}