You are here

function l10n_update_source_update in Localization update 7

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

Download and import or just import source, depending on type.

Parameters

$source: Translation source object with information about the file location. Object will be updated with :

  • 'last_checked': Timestamp of current time;
  • 'import_date': Timestamp of current time;

$mode: Download mode. How to treat exising and modified translations.

Return value

boolean TRUE on success, NULL on failure.

1 call to l10n_update_source_update()
l10n_update_check_translations in ./l10n_update.check.inc
Check updates for active projects and languages.

File

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

Code

function l10n_update_source_update($source, $mode) {
  if ($source->type == 'localfile' || l10n_update_source_download($source)) {
    if (l10n_update_source_import($source, $mode)) {
      l10n_update_source_history($source);
      return TRUE;
    }
  }
}