[Rt-commit] r11748 - in rt/branches/3.8-TESTING/html: installation

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Apr 16 09:40:52 EDT 2008


Author: sunnavy
Date: Wed Apr 16 09:40:52 2008
New Revision: 11748

Added:
   rt/branches/3.8-TESTING/html/installation/
   rt/branches/3.8-TESTING/html/installation/Step1.html
      - copied, changed from r11746, /rt/branches/3.8-TESTING/html/Install/Step1.html
   rt/branches/3.8-TESTING/html/installation/autohandler
      - copied, changed from r11739, /rt/branches/3.8-TESTING/html/Install/autohandler
   rt/branches/3.8-TESTING/html/installation/index.html
      - copied, changed from r11744, /rt/branches/3.8-TESTING/html/Install/Start.html
Removed:
   rt/branches/3.8-TESTING/html/Install/Step1.html
   rt/branches/3.8-TESTING/html/Install/autohandler

Log:
move stuff to instalation, don't use my wheels anymore

Copied: rt/branches/3.8-TESTING/html/installation/Step1.html (from r11746, /rt/branches/3.8-TESTING/html/Install/Step1.html)
==============================================================================
--- /rt/branches/3.8-TESTING/html/Install/Step1.html	(original)
+++ rt/branches/3.8-TESTING/html/installation/Step1.html	Wed Apr 16 09:40:52 2008
@@ -50,7 +50,7 @@
 <& /Elements/Tabs, 
     current_toptab => 'Install', Title => 'Install' &>
 
-<& Elements/ShowWarning, Warning => $Warning &>
+<& /Elements/ListActions, actions => \@results &>
 
 <form method="post">
 <table>
@@ -76,31 +76,29 @@
 
 <%init>
 
-my ( @Types, $Warning, $config );
+my ( @Types, @results );
 @Types = qw/SQLite mysql Oracle Pg Informix/;
-$config = {};
-
-$m->comp( 'Elements/GetConfig', File => $File, Variable => $config );
-$DatabaseType ||= $config->{DatabaseType};
 
 if ( $Run ) {
 
     if ( grep { $DatabaseType eq $_ } @Types ) {
     
-        $config->{DatabaseType} = $DatabaseType;
+        $session{InstallConfig}{DatabaseType} = $DatabaseType;
+        $session{TimeStamp} = time; # need this to force %session update
         
-        $m->comp( 'Elements/SetConfig', File => $File, Variable => $config );
-        $m->comp( 'Elements/Redirect', File => $File, Page => '/Install/Step2.html' );
+        RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'installation/Step2.html');
     }
     else {
-        $Warning = "invalid database type";
+        push @results, 'invalid database type';
     }
 }
+else {
+    $DatabaseType ||= $session{InstallConfig}{DatabaseType};
+}
 
 </%init>
 
 <%args>
 $DatabaseType => undef
-$File
 $Run => undef
 </%args>

Copied: rt/branches/3.8-TESTING/html/installation/autohandler (from r11739, /rt/branches/3.8-TESTING/html/Install/autohandler)
==============================================================================
--- /rt/branches/3.8-TESTING/html/Install/autohandler	(original)
+++ rt/branches/3.8-TESTING/html/installation/autohandler	Wed Apr 16 09:40:52 2008
@@ -48,11 +48,12 @@
 
 <%init>
 
-if ( -e $File ) {
+if ( $session{InstallConfig} ) {
     $m->call_next;
 }
 else {
-     RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . '/Install/Start.html' );
+     RT::Interface::Web::Redirect(RT->Config->Get('WebURL') .
+'installation/index.html' );
 
 }
 

Copied: rt/branches/3.8-TESTING/html/installation/index.html (from r11744, /rt/branches/3.8-TESTING/html/Install/Start.html)
==============================================================================
--- /rt/branches/3.8-TESTING/html/Install/Start.html	(original)
+++ rt/branches/3.8-TESTING/html/installation/index.html	Wed Apr 16 09:40:52 2008
@@ -53,7 +53,7 @@
 % if ( $RT::Installed && ! $Force ) {
 <div class="warning">
     Seems you've already run this wizard, do you want to config it again?
-    click <a href="/Install/Start.html?Force=1">here</a> to reconfig.
+    click <a href="?Force=1">here</a> to reconfig.
 </div>
 % } else {
 
@@ -75,12 +75,8 @@
 <%init>
 
 if ( $Run ) {
-    use File::Temp qw/tempfile/;
-    my $File;
-    (undef, $File ) = tempfile( 'rt_install_XXXXXX', TMPDIR => 1, UNLINK => 1 );
-    
-    $m->comp( 'Elements/SetConfig', File => $File, Variable => $config );
-    $m->comp( 'Elements/Redirect', File => $File, Page => '/Install/Step1.html' );
+    $session{InstallConfig} ||= {};
+    RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'installation/Step1.html');
 
 }
 


More information about the Rt-commit mailing list