Commit d7f9f71d authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Fix bustage from checkin of Bug 374331--defaultlanguage parameter no longer…

Fix bustage from checkin of Bug 374331--defaultlanguage parameter no longer exists, use $languages[0] instead. r=LpSolit
parent e6365732
...@@ -36,6 +36,7 @@ use Bugzilla::Util qw(get_text); ...@@ -36,6 +36,7 @@ use Bugzilla::Util qw(get_text);
use Bugzilla::Version; use Bugzilla::Version;
sub SETTINGS { sub SETTINGS {
my @languages = split(/[\s,]+/, Bugzilla->params->{'languages'});
return { return {
# 2005-03-03 travis@sedsystems.ca -- Bug 41972 # 2005-03-03 travis@sedsystems.ca -- Bug 41972
display_quips => { options => ["on", "off"], default => "on" }, display_quips => { options => ["on", "off"], default => "on" },
...@@ -58,8 +59,8 @@ sub SETTINGS { ...@@ -58,8 +59,8 @@ sub SETTINGS {
# 2006-08-04 wurblzap@gmail.com -- Bug 322693 # 2006-08-04 wurblzap@gmail.com -- Bug 322693
skin => { subclass => 'Skin', default => 'standard' }, skin => { subclass => 'Skin', default => 'standard' },
# 2006-12-10 LpSolit@gmail.com -- Bug 297186 # 2006-12-10 LpSolit@gmail.com -- Bug 297186
lang => { options => [split(/[\s,]+/, Bugzilla->params->{'languages'})], lang => { options => \@languages,
default => Bugzilla->params->{'defaultlanguage'} } default => $languages[0] }
} }
}; };
......
...@@ -438,9 +438,9 @@ ...@@ -438,9 +438,9 @@
<para>After untarring the localizations (or creating your own) in the <para>After untarring the localizations (or creating your own) in the
<filename class="directory">BUGZILLA_ROOT/template</filename> directory, <filename class="directory">BUGZILLA_ROOT/template</filename> directory,
you must update the <option>languages</option> parameter to contain any you must update the <option>languages</option> parameter to contain any
localizations you'd like to permit. You may also wish to set the localizations you'd like to permit. You may also wish to re-order
<option>defaultlanguage</option> parameter to something other than the <option>languages</option> parameter so that <quote>en</quote>
<quote>en</quote> if you don't want English to be the default language. doesn't come first, if you don't want English to be the default language.
</para> </para>
</section> </section>
......
...@@ -145,7 +145,7 @@ if ($action eq 'save' && $current_module) { ...@@ -145,7 +145,7 @@ if ($action eq 'save' && $current_module) {
# then we delete it (the user pref is reset to the default one). # then we delete it (the user pref is reset to the default one).
my @languages = split(/[\s,]+/, Bugzilla->params->{'languages'}); my @languages = split(/[\s,]+/, Bugzilla->params->{'languages'});
map {trick_taint($_)} @languages; map {trick_taint($_)} @languages;
add_setting('lang', \@languages, Bugzilla->params->{'defaultlanguage'}, undef, 1); add_setting('lang', \@languages, $languages[0], undef, 1);
} }
$vars->{'message'} = 'parameters_updated'; $vars->{'message'} = 'parameters_updated';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment