X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FInstaller.pm;h=7c3e079e3ec50479e7fa90edf63800a93ba99072;hb=a6f303fd9f14570f6d1654a175dbeadf00f4bd18;hp=3976adec63ff5b5146bdad03450ed51be78829e4;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6;p=freeside.git diff --git a/rt/lib/RT/Installer.pm b/rt/lib/RT/Installer.pm index 3976adec6..7c3e079e3 100644 --- a/rt/lib/RT/Installer.pm +++ b/rt/lib/RT/Installer.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -97,6 +97,7 @@ my %Meta = ( }, }, DatabaseAdmin => { + SkipWrite => 1, Widget => '/Widgets/Form/String', WidgetArguments => { Default => 1, @@ -106,6 +107,7 @@ my %Meta = ( }, }, DatabaseAdminPassword => { + SkipWrite => 1, Widget => '/Widgets/Form/String', WidgetArguments => { Description => 'DBA password', #loc @@ -149,6 +151,7 @@ my %Meta = ( }, }, Password => { + SkipWrite => 1, Widget => '/Widgets/Form/String', WidgetArguments => { Description => 'Administrative password', #loc @@ -252,7 +255,7 @@ sub CurrentValues { sub ConfigFile { require File::Spec; - return File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' ); + return $ENV{RT_SITE_CONFIG} || File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' ); } sub SaveConfig { @@ -274,10 +277,10 @@ sub SaveConfig { $RT::Installer->{InstallConfig}{rtname}; if ( open my $fh, '>', $file ) { - for ( keys %{ $RT::Installer->{InstallConfig} } ) { + for ( sort keys %{ $RT::Installer->{InstallConfig} } ) { # we don't want to store root's password in config. - next if $_ eq 'Password'; + next if $class->Meta($_) and $class->Meta($_)->{SkipWrite}; $RT::Installer->{InstallConfig}{$_} = '' unless defined $RT::Installer->{InstallConfig}{$_};