diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-02-21 23:51:45 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-02-21 23:51:45 +0000 |
commit | 0a50c581d83d2d8801ee5a9e78c127941f346d97 (patch) | |
tree | 4b2cba1bd87fbf26fe9d73fde8e588d91e8461e7 /modules | |
parent | 9ce37d2f4ce937a54dbec5f69f6ec4899aa757de (diff) | |
download | brdo-0a50c581d83d2d8801ee5a9e78c127941f346d97.tar.gz brdo-0a50c581d83d2d8801ee5a9e78c127941f346d97.tar.bz2 |
- Patch #545518 by sun, Xano: move Locale module specific code out of module.inc and system.module.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/locale/locale.module | 19 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 5 |
2 files changed, 18 insertions, 6 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 5ef074e6c..5654c77fd 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -773,7 +773,24 @@ function locale_language_list($field = 'name', $all = FALSE) { } /** - * Imports translations when new modules or themes are installed or enabled. + * Implements hook_modules_installed(). + */ +function locale_modules_installed($modules) { + locale_system_update($modules); +} + +/** + * Implements hook_themes_enabled(). + * + * @todo This is technically wrong. We must not import upon enabling, but upon + * initial installation. The theme system is missing an installation hook. + */ +function locale_themes_enabled($themes) { + locale_system_update($themes); +} + +/** + * Imports translations when new modules or themes are installed. * * This function will either import translation for the component change * right away, or start a batch if more files need to be imported. diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index d40a6e070..2a7dc15a5 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1181,11 +1181,6 @@ function system_modules_submit($form, &$form_state) { } $form_state['redirect'] = 'admin/modules'; - - // Notify locale module about module changes, so translations can be - // imported. This might start a batch, and only return to the redirect - // path after that. - module_invoke('locale', 'system_update', $actions['install']); } /** |