function drush_l10n_update_validate in Localization update 7.2
Same name and namespace in other branches
- 6 l10n_update.drush.inc \drush_l10n_update_validate()
- 7 l10n_update.drush.inc \drush_l10n_update_validate()
Validate command l10n-update.
File
- ./
l10n_update.drush.inc, line 111 - Drush interface to l10n-update functionalities.
Code
function drush_l10n_update_validate() {
$lang_validation = _drush_l10n_update_validate_languages();
if ($lang_validation == FALSE) {
return FALSE;
}
// Check provided update mode is valid.
$mode = drush_get_option('mode', 'keep');
if (!in_array($mode, array(
'keep',
'replace',
'overwrite',
))) {
return drush_set_error('L10N_UPDATE_INVALID_MODE', dt('Invalid update mode. Valid options are keep, replace, overwrite.'));
}
}