[Rt-commit] r17991 - in rt/3.999/branches/merge_to_3.8.2: . share/html/Install

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 29 03:19:26 EST 2009


Author: sunnavy
Date: Thu Jan 29 03:19:26 2009
New Revision: 17991

Modified:
   rt/3.999/branches/merge_to_3.8.2/   (props changed)
   rt/3.999/branches/merge_to_3.8.2/lib/RT/Action/Install.pm
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/Basics.html
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseDetails.html
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseType.html
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/Finish.html
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/Global.html
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/Initialize.html
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/Sendmail.html
   rt/3.999/branches/merge_to_3.8.2/share/html/Install/index.html

Log:
 r19176 at sunnavys-mb:  sunnavy | 2009-01-29 14:58:22 +0800
 merged Install stuff


Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Action/Install.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Action/Install.pm	(original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Action/Install.pm	Thu Jan 29 03:19:26 2009
@@ -268,6 +268,9 @@
             my $root = RT::Model::User->new( RT->system_user );
             $root->load('root');
             $root->set_password( $RT::Installer->{config}{password} );
+            system( 'chmod -w ' . RT::Installer->config_file )
+              && Jifty->log->error(
+                'failed to make ' . RT::Installer->config_file . ' readonly' );
             last;
         }
 

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/Basics.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/Basics.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/Basics.html	Thu Jan 29 03:19:26 2009
@@ -53,8 +53,8 @@
 
 <& Elements/Form, fields => [qw/rtname web_domain web_port password/],
     next => '/Install/Sendmail.html',
-    next_label => _('Next: ') . _('Email Configuration'),
+    next_label => _('Next: ') . _('Customize Email Configuration'),
     previous => '/Install/DatabaseDetails.html',
-    previous_label => _('Previous: ') . _('Check your database credentials' )
+    previous_label => _('Previous: ') . _('Check Database Credentials' )
     &>
 </&>

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseDetails.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseDetails.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseDetails.html	Thu Jan 29 03:19:26 2009
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&| Elements/Wrapper, title => _('Step %1 of %2: ', 2, 7 ) . _('Check your database credentials') &> 
+<&| Elements/Wrapper, title => _('Step %1 of %2: ', 2, 7 ) . _('Check Database Credentials') &> 
 
 % if ( @errors ) {
 <& Elements/Errors, errors => \@errors &>
@@ -69,7 +69,7 @@
     next => '/Install/Basics.html',
     next_label => _('Next: ') . _('Customize Basics'),
     previous => '/Install/DatabaseType.html',
-    previous_label => _('Previous: ') . _('Choose a database engine')
+    previous_label => _('Previous: ') . _('Choose Database Engine')
     &>
 </&>
 

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseType.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseType.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/DatabaseType.html	Thu Jan 29 03:19:26 2009
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&|Elements/Wrapper, title => _('Step %1 of %2: ', 1, 7 ) . _('Choose a database engine') &>
+<&|Elements/Wrapper, title => _('Step %1 of %2: ', 1, 7 ) . _('Choose Database Engine') &>
 
 <div class="intro">
 <p>
@@ -64,5 +64,5 @@
 
 <& Elements/Form, fields => 'database_type',
     next => '/Install/DatabaseDetails.html',
-    next_label => _('Next: ') . _('Check your database credentials') &>
+    next_label => _('Next: ') . _('Check Database Credentials') &>
 </&>

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/Finish.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/Finish.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/Finish.html	Thu Jan 29 03:19:26 2009
@@ -61,7 +61,7 @@
 </p>
 
 <p>
-<&|/l, RT::Installer->config_file &>The settings you've chosen are stored in %1.  You can edit this file to refine your configuration further. You can prevent this installation wizard from being shown again by running `<tt>chmod -w '%1'</tt>`.</&>
+<&|/l, RT::Installer->config_file &>The settings you've chosen are stored in %1.</&>
 </p>
 </div>
 

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/Global.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/Global.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/Global.html	Thu Jan 29 03:19:26 2009
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&| Elements/Wrapper, title => _('Step %1 of %2: ', 5, 7 ) . _('Customize Global Defaults') &> 
+<&| Elements/Wrapper, title => _('Step %1 of %2: ', 5, 7 ) . _('Customize Email Addresses') &> 
 
 <p><&|/l&>Help us set up some useful defaults for RT.</&></p>
 
@@ -58,7 +58,7 @@
     next => $next,
     next_label => _('Next: ') . _($next_label),
     previous => '/Install/Sendmail.html',
-    previous_label => _('Previous: ') . _('Email Configuration')
+    previous_label => _('Previous: ') . _('Customize Email Configuration')
     &>
 </&>
 <%init>

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/Initialize.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/Initialize.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/Initialize.html	Thu Jan 29 03:19:26 2009
@@ -55,6 +55,6 @@
     next => '/Install/Finish.html',
     next_label => _('Next: ') . _('Finish'),
     previous => '/Install/Global.html',
-    previous_label => _('Previous: ') . _('Customize Global Defaults')
+    previous_label => _('Previous: ') . _('Customize Email Addresses')
     &>
 </&>

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/Sendmail.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/Sendmail.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/Sendmail.html	Thu Jan 29 03:19:26 2009
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&|Elements/Wrapper, title => _('Step %1 of %2: ', 4, 7 ) . _('Email Configuration') &> 
+<&|Elements/Wrapper, title => _('Step %1 of %2: ', 4, 7 ) . _('Customize Email Configuration') &> 
 
 <p>
 <&|/l&>RT can communicate with your users about new tickets or new correspondence on tickets. Tell us where to find sendmail (or a sendmail compatible binary such as the one provided by postifx).  RT also needs to know who to notify when someone sends invalid email.  This must not be an address that feeds back into RT.</&>
@@ -53,7 +53,7 @@
 
 <& Elements/Form, fields => [qw/sendmail_path owner_email/],
     next => '/Install/Global.html',
-    next_label => _('Next: ') . _('Customize Global Defaults'),
+    next_label => _('Next: ') . _('Customize Email Addresses'),
     previous => '/Install/Basics.html',
     previous_label => _('Previous: ') . _('Customize Basics')
     &>

Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Install/index.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Install/index.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Install/index.html	Thu Jan 29 03:19:26 2009
@@ -49,7 +49,19 @@
 
 <& Elements/Errors, errors => \@errors &>
 
-% if ( !$locked) {
+% return if $locked;
+<form method="post">
+
+<h1><% _('Language.') %></h1>
+
+<div class="select-lang">
+<&|/l&>Select another language</&>:
+<& /Elements/SelectLang,
+    name => 'lang',
+    default => $lang_handle? $lang_handle->language_tag : undef,
+&>
+<input type="submit" class="button" name="change_lang" value="<% _('Change') %>" />
+</div>
 
 <h1><% _('What is RT?') %></h1>
 
@@ -79,15 +91,35 @@
 my @errors;
 my $locked;
 my $file = File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' );
-$locked = 1 unless -w $file;
+if ( ! -e $file ) {
+    # write a blank RT_SiteConfig.pm
+    open my $fh, '>', $file or die $!;
+    close $fh;
+}
+elsif ( ! -w $file ) {
+    $locked = 1;
+}
 
 if ( $locked ) {
     push @errors, _("Config file %1 is locked", $file);
 }
 
+if ( $change_lang && $lang ) {
+    # hackish, but works
+    Jifty->web->current_user = RT::CurrentUser->new;
+    Jifty->web->current_user->language_handle( $lang );
+}
+
+my $lang_handle = do { local $@;
+    eval {
+        (Jifty->web->current_user || RT::CurrentUser->new(RT->system_user->id))
+            ->language_handle
+    }
+};
 </%init>
 
 <%args>
-$run => 0
+$change_lang => undef
+$lang => undef
 </%args>
 


More information about the Rt-commit mailing list