function l10n_update_file_history in Localization update 6
Same name and namespace in other branches
- 7 l10n_update.inc \l10n_update_file_history()
Update the file history table.
Parameters
$file: Object representing the file just imported or downloaded.
Return value
integer FALSE on failure. Otherwise SAVED_NEW or SAVED_UPDATED. @see drupal_write_record()
1 call to l10n_update_file_history()
- l10n_update_source_history in ./l10n_update.check.inc 
- Update the file history table and delete the file if temporary.
File
- ./l10n_update.inc, line 191 
Code
function l10n_update_file_history($file) {
  // Update or write new record
  if (db_result(db_query("SELECT project FROM {l10n_update_file} WHERE project = '%s' AND language = '%s'", $file->project, $file->language))) {
    $update = array(
      'project',
      'language',
    );
  }
  else {
    $update = array();
  }
  return drupal_write_record('l10n_update_file', $file, $update);
}