Commit 0ee74224 authored by Frank Becker's avatar Frank Becker Committed by Dylan William Hardison

Bug 1296831 - allow answers file to override new install defaults

parent 4da9ab13
...@@ -36,6 +36,12 @@ use File::Basename; ...@@ -36,6 +36,12 @@ use File::Basename;
); );
Exporter::export_ok_tags('admin'); 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 # INITIALISATION CODE
# Perl throws a warning if we use bz_locations() directly after do. # Perl throws a warning if we use bz_locations() directly after do.
our %params; our %params;
...@@ -238,17 +244,15 @@ sub update_params { ...@@ -238,17 +244,15 @@ sub update_params {
elsif (exists $answer->{$name}) { elsif (exists $answer->{$name}) {
$param->{$name} = $answer->{$name}; $param->{$name} = $answer->{$name};
} }
elsif ($new_install and exists $NEW_INSTALL_DEFAULT{$name}) {
$param->{$name} = $NEW_INSTALL_DEFAULT{$name};
}
else { else {
$param->{$name} = $item->{'default'}; $param->{$name} = $item->{'default'};
} }
} }
} }
if ($new_install) {
$param->{'or_groups'} = 1;
$param->{'use_email_as_login'} = 0;
}
# --- REMOVE OLD PARAMS --- # --- REMOVE OLD PARAMS ---
my %oldparams; my %oldparams;
......
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