]> git.p6c8.net - jirafeau_mojo42.git/blobdiff - lib/functions.php
[BUGFIX] Print nice error when install.php is missing and we need it.
[jirafeau_mojo42.git] / lib / functions.php
index 4dcf5de235f94cb35c5670c17a495c8e26d51c93..95a5595ce4a647a9e7ee6bb42cca981176ff0800 100644 (file)
@@ -579,13 +579,15 @@ function show_errors()
 
 function check_errors($cfg)
 {
-    if (file_exists(JIRAFEAU_ROOT . 'install.php')
-        && !($cfg['installation_done'] === true)) {
-        header('Location: install.php');
-        exit;
+    if (!($cfg['installation_done'] === true)) {
+        if (file_exists(JIRAFEAU_ROOT . 'install.php')) {
+            header('Location: install.php');
+            exit;
+        } else {
+            add_error(t('INSTALL_FILE_NOT_FOUND_TITLE'), t('INSTALL_FILE_NOT_FOUND_DESC'));
+        }
     }
 
-    /* Checking for errors. */
     if (!is_writable(VAR_FILES)) {
         add_error(t('FILE_DIR_W'), VAR_FILES);
     }

patrick-canterino.de