[Rt-commit] r12001 - rt/branches/3.8-TESTING/lib/RT
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu May 1 22:12:54 EDT 2008
Author: sunnavy
Date: Thu May 1 22:12:54 2008
New Revision: 12001
Modified:
rt/branches/3.8-TESTING/lib/RT/Installer.pm
Log:
added SaveConfig method for installer
Modified: rt/branches/3.8-TESTING/lib/RT/Installer.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Installer.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Installer.pm Thu May 1 22:12:54 2008
@@ -244,6 +244,24 @@
return { map { $_ => CurrentValue($_) } @types };
}
+
+sub SaveConfig {
+
+ require File::Spec;
+ my $file = File::Spec->catfile($RT::EtcPath, 'RT_SiteConfig.pm');
+
+ if ( open my $fh, '>', $file ) {
+ for ( keys %{$RT::Installer->{InstallConfig}} ) {
+ print $fh "Set( \$$_, '$RT::Installer->{InstallConfig}{$_}' );\n";
+ }
+ print $fh "1;\n";
+ close $fh;
+ return ( 1, 'saved config with success' );
+ }
+
+ return ( 0, "can't save config to $file: $!" );
+}
+
=head1 NAME
RT::Installer - RT's Installer
More information about the Rt-commit
mailing list