install.php
changeset 199 c15c1d2bdeb8
parent 198 d5dff8148dfe
child 200 07cf7b0c175f
--- a/install.php	Mon Nov 05 17:07:22 2007 -0500
+++ b/install.php	Mon Nov 05 17:11:37 2007 -0500
@@ -1161,6 +1161,16 @@
       fwrite($cf_handle, $config_file);
       fclose($cf_handle);
       
+      echo 'done!<br />Renaming config.new.php and .htaccess.new...';
+      if ( !@rename('./config.new.php', './config.php') )
+        err('failed!<p>Please rename config.new.php manually to config.php. If you selected Tiny URLs, please also rename .htaccess.new to .htaccess.');
+      
+      if ( $_POST['urlscheme'] == 'tiny' )
+      {
+        if ( !@rename('./.htaccess.new', './.htaccess') )
+          err('failed!<p>Please rename .htaccess.new manually to .htaccess.');
+      }
+            
       echo 'done!<br />Starting the Enano API...';
       
       $template_bak = $template;
@@ -1205,16 +1215,6 @@
       
       PageUtils::flushlogs('Main_Page', 'Article');
       
-      echo 'done!<br />Renaming config.new.php and .htaccess.new...';
-      if ( !@rename('./config.new.php', './config.php') )
-        err('failed!<p>Please rename config.new.php manually to config.php. If you selected Tiny URLs, please also rename .htaccess.new to .htaccess.');
-      
-      if ( $_POST['urlscheme'] == 'tiny' )
-      {
-        if ( !@rename('./.htaccess.new', './.htaccess') )
-          err('failed!<p>Please rename .htaccess.new manually to .htaccess.');
-      }
-      
       echo 'done!<h3>Installation of Enano is complete.</h3><p>Review any warnings above, and then <a href="install.php?mode=finish">click here to finish the installation</a>.';
       
       // echo '<script type="text/javascript">window.location="'.scriptPath.'/install.php?mode=finish";</script>';