]> dev.renevier.net Git - syp.git/blobdiff - inc/templates_upgrade.php
improve wizard (hand editing of settings.php is no more needed)
[syp.git] / inc / templates_upgrade.php
index a636145e67bec5eec6c86ac604ae8348b6153034..9c3a24ab3411dfc13cb0150f337aeb62fd1e1222 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 /* Copyright (c) 2009 Arnaud Renevier, Inc, published under the modified BSD
    license. */
+    if (!@include_once ("./inc/settings.php")) {
+        header ('Location: install.php');
+    }
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">  
@@ -27,8 +30,8 @@
         return true;
     }
 
-    require_once ("./inc/settings.php");
     require_once ("./inc/db/mysql.php");
+    require_once ("./inc/install_utils.php");
     require_once ("./inc/utils.php");
 
     $error = false;
     }
     if ($error) {
        die(sprintf('<p class="error center">%s</p>', trans('SYP is not correctly installed. Please follow README.txt instructions
-       and go to <a href="wizard.en.php">wizard</a>.')));
+       and go to <a href="install.en.php">wizard</a>.')));
     }
 
     safe_create_writable_dir (getthumbsdir ());
     if (create_all_thumbs ($connection)) {
         par_success (trans('Thumbnails successfully created.'));
     } else {
-        par_error (trans('Error when creating thumbnails.'));
+        par_error_and_leave (trans('Error when creating thumbnails.'));
     }
 
     par_success (trans ('SYP upgrade went smoothly. You can now go to <a href="admin.en.php">admin area</a>'));