You are here

function l10n_update_file_history_delete in Localization update 7.2

Deletes the history of downloaded translations.

Parameters

array $projects: Project name(s) to be deleted from the file history. If both project(s) and language code(s) are specified the conditions will be ANDed.

array $langcodes: Language code(s) to be deleted from the file history.

3 calls to l10n_update_file_history_delete()
l10n_update_delete_translation_files in ./l10n_update.bulk.inc
Deletes interface translation files and translation history records.
l10n_update_languages_delete_submit in ./l10n_update.module
Additional submit handler for language deletion form.
l10n_update_system_remove in ./l10n_update.module
Delete translation history of modules and themes.

File

./l10n_update.module, line 632
Download translations from remote localization server.

Code

function l10n_update_file_history_delete($projects = array(), $langcodes = array()) {
  $query = db_delete('l10n_update_file');
  if (!empty($projects)) {
    $query
      ->condition('project', $projects);
  }
  if (!empty($langcodes)) {
    $query
      ->condition('language', $langcodes);
  }
  $query
    ->execute();
}