summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker <Frank@Frank-Becker.de>2016-08-24 16:25:43 +0200
committerDylan William Hardison <dylan@hardison.net>2016-08-24 16:25:43 +0200
commit0ee74224619e84abe3c4004fc8f756442574c3d9 (patch)
treec89915f5072fa5397be74695461deefc49b1255a
parent4da9ab1303fa775664d4ae2593547441dcadc36e (diff)
downloadbugzilla-0ee74224619e84abe3c4004fc8f756442574c3d9.tar.gz
bugzilla-0ee74224619e84abe3c4004fc8f756442574c3d9.tar.xz
Bug 1296831 - allow answers file to override new install defaults
-rw-r--r--Bugzilla/Config.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index 79b468f0c..49918d5c1 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -36,6 +36,12 @@ use File::Basename;
);
Exporter::export_ok_tags('admin');
+# new installs get these set of defaults (unless overriden by the answers file)
+my %NEW_INSTALL_DEFAULT = (
+ or_groups => 1,
+ use_email_as_login => 0,
+);
+
# INITIALISATION CODE
# Perl throws a warning if we use bz_locations() directly after do.
our %params;
@@ -238,17 +244,15 @@ sub update_params {
elsif (exists $answer->{$name}) {
$param->{$name} = $answer->{$name};
}
+ elsif ($new_install and exists $NEW_INSTALL_DEFAULT{$name}) {
+ $param->{$name} = $NEW_INSTALL_DEFAULT{$name};
+ }
else {
$param->{$name} = $item->{'default'};
}
}
}
- if ($new_install) {
- $param->{'or_groups'} = 1;
- $param->{'use_email_as_login'} = 0;
- }
-
# --- REMOVE OLD PARAMS ---
my %oldparams;