From: mkanat%bugzilla.org <> Date: Wed, 30 Sep 2009 11:42:50 +0000 (+0000) Subject: Bug 519676: Allow users to set blank/false values for things in checksetup.pl's ... X-Git-Tag: bugzilla-3.5.1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc391b5583836b71cc8f68789fb48b712d7fa6b5;p=thirdparty%2Fbugzilla.git Bug 519676: Allow users to set blank/false values for things in checksetup.pl's "answers" file. Patch by Max Kanat-Alexander (module owner) a=mkanat --- diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index 4074abcd1a..a207517371 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -199,7 +199,12 @@ sub update_params { my $name = $item->{'name'}; unless (exists $param->{$name}) { print "New parameter: $name\n" unless $new_install; - $param->{$name} = $answer->{$name} || $item->{'default'}; + if (exists $answer->{$name}) { + $param->{$name} = $answer->{$name}; + } + else { + $param->{$name} = $item->{'default'}; + } } } diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index 9710647226..3467466559 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -326,7 +326,12 @@ sub update_localconfig { if (!defined $localconfig->{$name}) { push(@new_vars, $name); $var->{default} = &{$var->{default}} if ref($var->{default}) eq 'CODE'; - $localconfig->{$name} = $answer->{$name} || $var->{default}; + if (exists $answer->{$name}) { + $localconfig->{$name} = $answer->{$name}; + } + else { + $localconfig->{$name} = $var->{default}; + } } }