X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FInstaller.pm;h=372c33d327142ccd8ba00ade0043faccb58fa7e7;hp=d12abb6784d7677d2d2e9d0c1d04acf181c64918;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=c24d6e2242ae0e026684b8f95decf156aba6e75e diff --git a/rt/lib/RT/Installer.pm b/rt/lib/RT/Installer.pm index d12abb678..372c33d32 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-2017 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 @@ -129,12 +131,6 @@ my %Meta = ( Hints => 'The password RT should use to connect to the database.', }, }, - DatabaseRequireSSL => { - Widget => '/Widgets/Form/Boolean', - WidgetArguments => { - Description => 'Use SSL?', # loc - }, - }, rtname => { Widget => '/Widgets/Form/String', WidgetArguments => { @@ -149,6 +145,7 @@ my %Meta = ( }, }, Password => { + SkipWrite => 1, Widget => '/Widgets/Form/String', WidgetArguments => { Description => 'Administrative password', #loc @@ -274,10 +271,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}{$_}; @@ -285,7 +282,9 @@ sub SaveConfig { # remove obsolete settings we'll add later $content =~ s/^\s* Set \s* \( \s* \$$_ .*$//xm; - $content .= "Set( \$$_, '$RT::Installer->{InstallConfig}{$_}' );\n"; + my $value = $RT::Installer->{InstallConfig}{$_}; + $value =~ s/(['\\])/\\$1/g; + $content .= "Set( \$$_, '$value' );\n"; } $content .= "1;\n"; print $fh $content;