From b57be646fe9fb07b5ebdd38a66b16de1b87d2a2d Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Mon, 29 Jun 2009 19:24:48 -0700 Subject: Don't repeat the default locale in the installed locales list. --- modules/gallery/helpers/locale.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') 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)); } -- cgit v1.2.3