From 2f9979c79088c4dd4407814e9d616afbdc1f8f30 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 24 Dec 2011 21:56:26 +0000 Subject: [PATCH] include config.php before define()ing settings, so that config.php can control them --- index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 47ef6c56..5c93e343 100644 --- a/index.php +++ b/index.php @@ -50,6 +50,12 @@ * Each of these can be imported at the start of a function with eg "global $page, $user;" */ +if(empty($database_dsn) && !file_exists("config.php")) { + header("Location: install.php"); + exit; +} +require_once "config.php"; + // set up and purify the environment define("DEBUG", true); define("COVERAGE", true); @@ -62,12 +68,6 @@ define("COOKIE_PREFIX", 'shm'); define("SPEED_HAX", false); define("FORCE_NICE_URLS", false); -if(empty($database_dsn) && !file_exists("config.php")) { - header("Location: install.php"); - exit; -} - -require_once "config.php"; require_once "core/util.inc.php"; require_once "lib/context.php"; if(CONTEXT) {