[Rt-commit] r13535 - in rt/3.8/trunk: . lib share/html/Install
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Jun 23 10:29:35 EDT 2008
Author: sunnavy
Date: Mon Jun 23 10:29:30 2008
New Revision: 13535
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/lib/RT.pm.in
rt/3.8/trunk/lib/RT/Installer.pm
rt/3.8/trunk/share/html/Install/Basics.html
rt/3.8/trunk/share/html/Install/DatabaseDetails.html
rt/3.8/trunk/share/html/Install/Emails.html
rt/3.8/trunk/share/html/Install/Sendmail.html
rt/3.8/trunk/share/html/Install/index.html
Log:
r13719 at sunnavys-mb: sunnavy | 2008-06-23 20:48:30 +0800
show either "check" or "next", not both
r13720 at sunnavys-mb: sunnavy | 2008-06-23 20:56:04 +0800
Default OwnerEmail is undef
r13721 at sunnavys-mb: sunnavy | 2008-06-23 20:59:49 +0800
more hints for OwnerEmail
r13722 at sunnavys-mb: sunnavy | 2008-06-23 21:06:18 +0800
kick SendmailArguments SendmailBounceArguments out
r13723 at sunnavys-mb: sunnavy | 2008-06-23 21:11:19 +0800
move OwnerEmail to Sendmail page
r13724 at sunnavys-mb: sunnavy | 2008-06-23 21:12:39 +0800
updated OwnerEmail hints
r13725 at sunnavys-mb: sunnavy | 2008-06-23 21:26:26 +0800
use Cwd::realpath to canon paths
r13726 at sunnavys-mb: sunnavy | 2008-06-23 21:35:02 +0800
force user to input password, it can't be null
r13727 at sunnavys-mb: sunnavy | 2008-06-23 21:44:35 +0800
hints for WebDomain and WebPort
r13728 at sunnavys-mb: sunnavy | 2008-06-23 21:49:10 +0800
complete #loc
r13729 at sunnavys-mb: sunnavy | 2008-06-23 22:13:56 +0800
refactor a bit
Modified: rt/3.8/trunk/lib/RT.pm.in
==============================================================================
--- rt/3.8/trunk/lib/RT.pm.in (original)
+++ rt/3.8/trunk/lib/RT.pm.in Mon Jun 23 10:29:30 2008
@@ -53,6 +53,7 @@
use File::Spec ();
+use Cwd ();
use vars qw($Config $System $SystemUser $Nobody $Handle $Logger $_INSTALL_MODE);
@@ -104,6 +105,8 @@
File::Spec->catdir( $pm_path, File::Spec->updir ) );
}
+ $BasePath = Cwd::realpath( $BasePath );
+
for my $path ( qw/EtcPath BinPath SbinPath VarPath LocalPath LocalEtcPath
LocalLibPath LocalLexiconPath LocalPluginPath MasonComponentRoot
MasonLocalComponentRoot MasonDataDir MasonSessionDir/ ) {
Modified: rt/3.8/trunk/lib/RT/Installer.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Installer.pm (original)
+++ rt/3.8/trunk/lib/RT/Installer.pm Mon Jun 23 10:29:30 2008
@@ -155,7 +155,7 @@
Widget => '/Widgets/Form/String',
WidgetArguments => {
Description => 'RT Administrator', #loc
- Hints => 'The email address of a human who manages RT.',
+ Hints => "When RT can't handle an email message, where should it be forwarded to?", #loc
},
},
CommentAddress => {
@@ -174,18 +174,6 @@
'the default addresses that will be listed in From: and Reply-To: headers of correspondence mail.' #loc
},
},
- SendmailArguments => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'Sendmail arguments', #loc
- },
- },
- SendmailBounceArguments => {
- Widget => '/Widgets/Form/String',
- WidgetArguments => {
- Description => 'Sendmail bounce arguments', #loc
- },
- },
SendmailPath => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
@@ -195,13 +183,15 @@
WebDomain => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'domain name', #loc
+ Description => 'Domain name', #loc
+ Hints => "like 'localhost', 'rt.example.com'", #loc
},
},
WebPort => {
Widget => '/Widgets/Form/Integer',
WidgetArguments => {
- Description => 'web port', #loc
+ Description => 'Web port', #loc
+ Hints => 'which port your web server will listen to, e.g. 8080', #loc
},
},
Modified: rt/3.8/trunk/share/html/Install/Basics.html
==============================================================================
--- rt/3.8/trunk/share/html/Install/Basics.html (original)
+++ rt/3.8/trunk/share/html/Install/Basics.html Mon Jun 23 10:29:30 2008
@@ -76,6 +76,10 @@
}
}
+ unless ( $ARGS{Password} ) {
+ push @results, "Invalid password: it can't be null";
+ }
+
if ( $Back ) {
RT::Interface::Web::Redirect(RT->Config->Get('WebURL') .
'Install/DatabaseDetails.html');
Modified: rt/3.8/trunk/share/html/Install/DatabaseDetails.html
==============================================================================
--- rt/3.8/trunk/share/html/Install/DatabaseDetails.html (original)
+++ rt/3.8/trunk/share/html/Install/DatabaseDetails.html Mon Jun 23 10:29:30 2008
@@ -58,18 +58,18 @@
( $db_type eq 'mysql' ? 'root'
: $db_type eq 'Pg' ? 'postgres'
: '' ),
- DatabasePassword => @results ?
- $RT::Installer->{InstallConfig}{DatabasePassword} : ''
}
&>
<input type="hidden" name="Run" value="1">
-<& /Elements/Submit, Label => loc('Check Database Connectivity'),
+% if ( @results && $results[0] eq 'Connection succeeded' ) {
+<& /Elements/Submit, Label => loc('Next: ') . loc('Customize Basics'),
Back => 1, BackLabel => loc('Back: ') . loc('Select Database Type'),
+Name => 'Next' &>
+% } else {
+<& /Elements/Submit, Label => loc('Check Database Connectivity'),
+Back => 1, BackLabel => loc('Back: ') . loc('Select Database Type')
&>
-
-% if ( @results && $results[0] eq 'Connection succeeded' ) {
-<& /Elements/Submit, Label => loc('Next: ') . loc('Customize Basics'), Name => 'Next' &>
% }
Modified: rt/3.8/trunk/share/html/Install/Emails.html
==============================================================================
--- rt/3.8/trunk/share/html/Install/Emails.html (original)
+++ rt/3.8/trunk/share/html/Install/Emails.html Mon Jun 23 10:29:30 2008
@@ -51,7 +51,8 @@
<form method="post">
<& /Widgets/BulkEdit, Types => \@Types,Meta => $RT::Installer->{Meta},
- CurrentValue => RT::Installer->CurrentValues(@Types) &>
+ CurrentValue => RT::Installer->CurrentValues(@Types)
+&>
<input type="hidden" name="Run" value="1">
<& /Elements/Submit, Label => loc('Next: ') . loc( 'Email Configuration'),
@@ -61,7 +62,7 @@
<%init>
my @results;
-my @Types = qw/OwnerEmail CommentAddress CorrespondAddress/;
+my @Types = qw/CommentAddress CorrespondAddress/;
if ( $Run ) {
Modified: rt/3.8/trunk/share/html/Install/Sendmail.html
==============================================================================
--- rt/3.8/trunk/share/html/Install/Sendmail.html (original)
+++ rt/3.8/trunk/share/html/Install/Sendmail.html Mon Jun 23 10:29:30 2008
@@ -51,7 +51,8 @@
<form method="post">
<& /Widgets/BulkEdit, Types => \@Types,Meta => $RT::Installer->{Meta},
- CurrentValue => RT::Installer->CurrentValues(@Types) &>
+ CurrentValue => RT::Installer->CurrentValues(@Types)
+&>
<input type="hidden" name="Run" value="1">
<& /Elements/Submit, Label => $RT::Installer->{DatabaseAction} eq 'none' ?
@@ -62,7 +63,7 @@
<%init>
my @results;
-my @Types = qw/SendmailArguments SendmailBounceArguments SendmailPath/;
+my @Types = qw/OwnerEmail SendmailPath/;
if ( $Run ) {
@@ -80,6 +81,11 @@
push @results, "$ARGS{SendmailPath} doesn't exist.";
}
+ if ( ! $ARGS{OwnerEmail} || $ARGS{OwnerEmail} !~ /.+ at .+/ ) {
+ push @results, "Invalid OwnerEmail: not like an email address";
+ }
+
+
unless ( @results ) {
my ( $status, $msg ) = RT::Installer->SaveConfig;
Modified: rt/3.8/trunk/share/html/Install/index.html
==============================================================================
--- rt/3.8/trunk/share/html/Install/index.html (original)
+++ rt/3.8/trunk/share/html/Install/index.html Mon Jun 23 10:29:30 2008
@@ -86,12 +86,18 @@
elsif ( $Run ) {
$RT::Installer->{InstallConfig} ||= {};
for my $field ( qw/DatabaseType DatabaseName DatabaseHost DatabasePort
- DatabaseUser DatabasePassword DatabaseRequireSSL rtname
- Organization TimeZone MinimumPasswordLength MaxAttachmentSize
- OwnerEmail CommentAddress CorrespondAddress MailCommand
- SendmailArguments SendmailBounceArguments SendmailPath/ ) {
+ DatabaseUser DatabaseRequireSSL rtname
+ Organization TimeZone CommentAddress CorrespondAddress
+ SendmailPath WebDomain WebPort/ ) {
$RT::Installer->{InstallConfig}{$field} ||= RT->Config->Get($field);
}
+
+ for my $field ( qw/OwnerEmail Password DatabasePassword
+ DatabaseAdminPassword/ ) {
+ # stuff we don't want to keep null
+ $RT::Installer->{InstallConfig}{$field} = '';
+ }
+
RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'Install/DatabaseType.html');
}
More information about the Rt-commit
mailing list