X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/6eca3aa915782488ab0d688d7397c42e3fdf30b4..48fd211cd255ea9ff05d0556eed4b6033683794a:/lib/functions.php?ds=sidebyside diff --git a/lib/functions.php b/lib/functions.php index 4dcf5de..536bfe1 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -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); } @@ -1560,5 +1562,5 @@ function jirafeau_add_ending_slash($path) function jirafeau_default_web_root() { - return $_SERVER['HTTP_HOST'] . str_replace(basename(__FILE__), '', $_SERVER['REQUEST_URI']); + return $_SERVER['HTTP_HOST'] . str_replace('install.php', '', $_SERVER['REQUEST_URI']); }