diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-06-29 19:24:48 -0700 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-06-29 19:24:48 -0700 |
commit | b57be646fe9fb07b5ebdd38a66b16de1b87d2a2d (patch) | |
tree | 8ccbb7ff99079f92badbb8dd7125f36978372700 /modules/gallery/helpers | |
parent | 4dab7f8dd04a68349e5174c8d6a4958305ad3005 (diff) |
Don't repeat the default locale in the installed locales list.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/locale.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/helpers/locale.php b/modules/gallery/helpers/locale.php index 9783a53a..41b78834 100644 --- a/modules/gallery/helpers/locale.php +++ b/modules/gallery/helpers/locale.php @@ -50,7 +50,9 @@ class locale_Core { static function update_installed($locales) { // Ensure that the default is included... $default = module::get_var("gallery", "default_locale"); - $locales = array_merge($locales, array($default)); + $locales = in_array($default, $locales) + ? $locales + : array_merge($locales, array($default)); module::set_var("gallery", "installed_locales", join("|", $locales)); } |