You are here

function l10n_update_source_history in Localization update 7

Same name and namespace in other branches
  1. 6 l10n_update.check.inc \l10n_update_source_history()

Update the file history table and delete the file if temporary.

Parameters

$file: Source object representing the file just imported or downloaded.

2 calls to l10n_update_source_history()
l10n_update_source_update in ./l10n_update.check.inc
Download and import or just import source, depending on type.
_l10n_update_batch_history in ./l10n_update.batch.inc
Batch process: Update the download history table.

File

./l10n_update.check.inc, line 393
Reusable API for l10n remote updates using $source objects

Code

function l10n_update_source_history($file) {

  // Update history table
  l10n_update_file_history($file);

  // If it's a downloaded file and not marked for keeping, delete the file.
  if ($file->type == 'download' && empty($file->keep)) {
    file_unmanaged_delete($file->uri);
    $file->uri = '';
  }
}