projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rt 4.2.14 (#13852)
[freeside.git]
/
rt
/
lib
/
RT
/
Installer.pm
diff --git
a/rt/lib/RT/Installer.pm
b/rt/lib/RT/Installer.pm
index
3976ade
..
372c33d
100644
(file)
--- a/
rt/lib/RT/Installer.pm
+++ b/
rt/lib/RT/Installer.pm
@@
-2,7
+2,7
@@
#
# COPYRIGHT:
#
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-201
2
Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-201
7
Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@
-97,6
+97,7
@@
my %Meta = (
},
},
DatabaseAdmin => {
},
},
DatabaseAdmin => {
+ SkipWrite => 1,
Widget => '/Widgets/Form/String',
WidgetArguments => {
Default => 1,
Widget => '/Widgets/Form/String',
WidgetArguments => {
Default => 1,
@@
-106,6
+107,7
@@
my %Meta = (
},
},
DatabaseAdminPassword => {
},
},
DatabaseAdminPassword => {
+ SkipWrite => 1,
Widget => '/Widgets/Form/String',
WidgetArguments => {
Description => 'DBA password', #loc
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.',
},
},
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 => {
rtname => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
@@
-149,6
+145,7
@@
my %Meta = (
},
},
Password => {
},
},
Password => {
+ SkipWrite => 1,
Widget => '/Widgets/Form/String',
WidgetArguments => {
Description => 'Administrative password', #loc
Widget => '/Widgets/Form/String',
WidgetArguments => {
Description => 'Administrative password', #loc
@@
-252,7
+249,7
@@
sub CurrentValues {
sub ConfigFile {
require File::Spec;
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 {
}
sub SaveConfig {
@@
-274,10
+271,10
@@
sub SaveConfig {
$RT::Installer->{InstallConfig}{rtname};
if ( open my $fh, '>', $file ) {
$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.
# 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}{$_};
$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;
# 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;
}
$content .= "1;\n";
print $fh $content;