[Rt-commit] r11882 - in rt/branches/3.8-TESTING: html/installation
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Apr 24 15:54:59 EDT 2008
Author: sunnavy
Date: Thu Apr 24 15:54:56 2008
New Revision: 11882
Added:
rt/branches/3.8-TESTING/lib/RT/Installer.pm
Modified:
rt/branches/3.8-TESTING/html/installation/autohandler
Log:
moved the big widget option hash to Installer.pm, which(hashref) can be retrieved by RT::Installer->Option
Modified: rt/branches/3.8-TESTING/html/installation/autohandler
==============================================================================
--- rt/branches/3.8-TESTING/html/installation/autohandler (original)
+++ rt/branches/3.8-TESTING/html/installation/autohandler Thu Apr 24 15:54:56 2008
@@ -51,129 +51,10 @@
<%init>
RT::Interface::Web::Redirect(RT->Config->Get('WebURL')) unless (RT->InstallMode);
if (RT->InstallMode) {
- require UNIVERSAL::require;
+ require RT::Installer;
+
$RT::Installer->{'CurrentUser'} = RT::CurrentUser->new();
- $RT::Installer->{Option} = {
- DatabaseType => {
- Widget => '/Widgets/Form/Select',
- WidgetArguments => {
- Description => 'Type of the database where RT will store its data',
-
- Values => [ grep { my $m = 'DBD::' . $_; $m->require ? 1 : 0
- } qw/mysql Pg SQLite Oracle/ ],
- ValuesLabel => {
- mysql => 'MySQL', #loc
- Pg => 'PostgreSQL', #loc
- SQLite => 'SQLite (for experiments and development only)', #loc
- Oracle => 'Oracle', #loc
- },
- },
- },
- DatabaseHost => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'The domain name of your database server', #loc
- },
- },
- DatabasePort => {
- Widget => '/Widgets/Form/Integer',
- WidgetArguments => {
- Description => 'Port number database server listen to', #loc
- Default => 1,
- DefaultLabel => 'Leave empty to use default value of the RDBMS', #loc
- },
- },
- DatabaseName => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'Name of the database', #loc
- },
- },
- DatabaseUser => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'The name of the user RT will use to connect to the DB', #loc
- },
- },
- DatabasePassword => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'Password of the above user RT will use to connect to the DB', #loc
- },
- },
- DatabaseRequireSSL => {
- Widget => '/Widgets/Form/Boolean',
- WidgetArguments => {
- Description => 'Connecting DB requires SSL', # loc
- },
- },
- rtname => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'rtname', #loc
- },
- },
- Organization => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'Organization', #loc
- },
- },
- MinimumPasswordLength => {
- Widget => '/Widgets/Form/Integer',
- WidgetArguments => {
- Description => 'MinimumPasswordLength', #loc
- },
- },
- MaxAttachmentSize => {
- Widget => '/Widgets/Form/Integer',
- WidgetArguments => {
- Description => 'MaxAttachmentSize', #loc
- },
- },
- OwnerEmail => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'OwnderEmail', #loc
- },
- },
- CommentAddress => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'CommentAddress', #loc
- },
- },
- CorrespondAddress => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'CorrespondAddress', #loc
- },
- },
- MailCommand => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'MailCommand', #loc
- },
- },
- SendmailArguments => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'SendmailArguments', #loc
- },
- },
- SendmailBounceArguments => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'SendmailBounceArguments', #loc
- },
- },
- SendmailPath => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'SendmailPath', #loc
- },
- },
- };
+ $RT::Installer->{Option} = RT::Installer->Option;
}
else {
RT::Interface::Web::Redirect(RT->Config->Get('WebURL'));
Added: rt/branches/3.8-TESTING/lib/RT/Installer.pm
==============================================================================
--- (empty file)
+++ rt/branches/3.8-TESTING/lib/RT/Installer.pm Thu Apr 24 15:54:56 2008
@@ -0,0 +1,156 @@
+package RT::Installer;
+use strict;
+use warnings;
+
+require UNIVERSAL::require;
+my %Option = (
+ DatabaseType => {
+ Widget => '/Widgets/Form/Select',
+ WidgetArguments => {
+ Description => 'Type of the database where RT will store its data',
+ Values => [
+ grep {
+ my $m = 'DBD::' . $_;
+ $m->require ? 1 : 0
+ } qw/mysql Pg SQLite Oracle/
+ ],
+ ValuesLabel => {
+ mysql => 'MySQL', #loc
+ Pg => 'PostgreSQL', #loc
+ SQLite => 'SQLite (for experiments and development only)', #loc
+ Oracle => 'Oracle', #loc
+ },
+ },
+ },
+ DatabaseHost => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'The domain name of your database server', #loc
+ },
+ },
+ DatabasePort => {
+ Widget => '/Widgets/Form/Integer',
+ WidgetArguments => {
+ Description => 'Port number database server listen to', #loc
+ Default => 1,
+ DefaultLabel =>
+ 'Leave empty to use default value of the RDBMS', #loc
+ },
+ },
+ DatabaseName => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'Name of the database', #loc
+ },
+ },
+ DatabaseUser => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description =>
+ 'The name of the user RT will use to connect to the DB', #loc
+ },
+ },
+ DatabasePassword => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description =>
+ 'Password of the above user RT will use to connect to the DB'
+ , #loc
+ },
+ },
+ DatabaseRequireSSL => {
+ Widget => '/Widgets/Form/Boolean',
+ WidgetArguments => {
+ Description => 'Connecting DB requires SSL', # loc
+ },
+ },
+ rtname => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'rtname', #loc
+ },
+ },
+ Organization => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'Organization', #loc
+ },
+ },
+ MinimumPasswordLength => {
+ Widget => '/Widgets/Form/Integer',
+ WidgetArguments => {
+ Description => 'MinimumPasswordLength', #loc
+ },
+ },
+ MaxAttachmentSize => {
+ Widget => '/Widgets/Form/Integer',
+ WidgetArguments => {
+ Description => 'MaxAttachmentSize', #loc
+ },
+ },
+ OwnerEmail => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'OwnderEmail', #loc
+ },
+ },
+ CommentAddress => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'CommentAddress', #loc
+ },
+ },
+ CorrespondAddress => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'CorrespondAddress', #loc
+ },
+ },
+ MailCommand => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'MailCommand', #loc
+ },
+ },
+ SendmailArguments => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'SendmailArguments', #loc
+ },
+ },
+ SendmailBounceArguments => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'SendmailBounceArguments', #loc
+ },
+ },
+ SendmailPath => {
+ Widget => '/Widgets/Form/String',
+ WidgetArguments => {
+ Description => 'SendmailPath', #loc
+ },
+ },
+
+);
+
+sub Option {
+ return \%Option;
+}
+
+=head1 NAME
+
+ RT::Installer - RT's Installer
+
+=head1 SYNOPSYS
+
+ use RT::Installer;
+ my $option = RT::Installer->Option;
+
+=head1 DESCRIPTION
+
+C<RT::Installer> class provides access to RT Installer Options
+
+=cut
+
+1;
+
More information about the Rt-commit
mailing list