rt 4.0.23
[freeside.git] / rt / lib / RT / Installer.pm
index d12abb6..7c3e079 100644 (file)
@@ -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
 #                                          <sales@bestpractical.com>
 #
 # (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
@@ -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}{$_};