Commit 0283ed72 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Check for installation in init.php so that any hit public page will

redirect to the installer if the system is not installed.
parent dc596519
......@@ -142,4 +142,12 @@ $CFG->themeurl = get_config('wwwroot') . 'theme/' . get_config('theme') . '/stat
require('auth/lib.php');
$USER = auth_setup();
// check to see if we're installed...
if (!get_config('installed')
&& false === strpos($_SERVER['SCRIPT_FILENAME'], 'admin/index.php')
&& false === strpos($_SERVER['SCRIPT_FILENAME'], 'admin/upgrade.php')
&& false === strpos($_SERVER['SCRIPT_FILENAME'], 'admin/upgrade.json.php')) {
redirect(get_config('wwwroot') . 'admin/index.php');
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment