Skip to content

Commit

Permalink
Don't repeat the default locale in the installed locales list.
Browse files Browse the repository at this point in the history
  • Loading branch information
andyst committed Jun 30, 2009
1 parent 4dab7f8 commit b57be64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/gallery/helpers/locale.php
Expand Up @@ -50,7 +50,9 @@ static function installed() {
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));
}
Expand Down

0 comments on commit b57be64

Please sign in to comment.