From 0fccdb26ae49bd8bb6022d48b769595e0a328278 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 19 Sep 2006 05:16:43 +0000 Subject: Bug 352235: Use Bugzilla->localconfig everywhere instead of :localconfig from Bugzilla::Config Patch By Max Kanat-Alexander r=LpSolit, a=myk --- Bugzilla/Install/Localconfig.pm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index 971c27d02..1f5da3108 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -10,6 +10,10 @@ # implied. See the License for the specific language governing # rights and limitations under the License. # +# The Initial Developer of the Original Code is Everything Solved. +# Portions created by Everything Solved are Copyright (C) 2006 +# Everything Solved. All Rights Reserved. +# # The Original Code is the Bugzilla Bug Tracking System. # # Contributor(s): Max Kanat-Alexander @@ -39,10 +43,7 @@ our @EXPORT_OK = qw( update_localconfig ); -# We write this constant as a sub because it has to call other -# subroutines. -sub LOCALCONFIG_VARS { - return ( +use constant LOCALCONFIG_VARS => ( { name => 'create_htaccess', default => 1, @@ -156,7 +157,7 @@ EOT }, { name => 'cvsbin', - default => &_get_default_cvsbin, + default => \&_get_default_cvsbin, desc => < 'interdiffbin', - default => &_get_default_interdiffbin, + default => \&_get_default_interdiffbin, desc => < 'diffpath', - default => &_get_default_diffpath, + default => \&_get_default_diffpath, desc => < qw( mysqlpath @@ -280,6 +280,7 @@ sub update_localconfig { my $name = $var->{name}; if (!defined $localconfig->{$name}) { push(@new_vars, $name); + $var->{default} = &{$var->{default}} if ref($var->{default}) eq 'CODE'; $localconfig->{$name} = $answer->{$name} || $var->{default}; } } -- cgit v1.2.3-24-g4f1b