function _l10n_update_batch_download in Localization update 6
Same name and namespace in other branches
- 7 l10n_update.batch.inc \_l10n_update_batch_download()
Batch process: Download a file.
Parameters
$id: Batch id to identify batch results. Result of this batch function are stored in $context['result'] identified by this $id.
$file: File to be downloaded.
$context: Batch context array.
2 string references to '_l10n_update_batch_download'
- l10n_update_batch_download in ./
l10n_update.batch.inc - Create a batch to just download files.
- l10n_update_batch_multiple in ./
l10n_update.batch.inc - Create a big batch for multiple projects and languages.
File
- ./
l10n_update.batch.inc, line 114
Code
function _l10n_update_batch_download($id, $file, &$context) {
$t = get_t();
if (l10n_update_source_download($file)) {
$context['message'] = $t('Importing: %name.', array(
'%name' => $file->filename,
));
$context['results'][$id] = array(
'file' => $file,
);
}
else {
$context['results'][$id] = array(
'file' => $file,
'fail' => TRUE,
);
}
}