load config.php sooner

This commit is contained in:
Shish 2009-08-09 13:10:59 +01:00
parent d95855411d
commit 1e8e5adbbf
2 changed files with 36 additions and 41 deletions

View File

@ -222,8 +222,7 @@ class Database {
* stored in config.php in the root shimmie folder * stored in config.php in the root shimmie folder
*/ */
public function Database() { public function Database() {
if(is_readable("config.php")) { global $database_dsn;
require_once "config.php";
if(substr($database_dsn, 0, 5) == "mysql") { if(substr($database_dsn, 0, 5) == "mysql") {
$this->engine = new MySQL(); $this->engine = new MySQL();
@ -267,11 +266,6 @@ class Database {
exit; exit;
} }
} }
else {
header("Location: install.php");
exit;
}
}
/** /**
* Execute an SQL query and return an ADODB resultset * Execute an SQL query and return an ADODB resultset

View File

@ -61,6 +61,7 @@ if(!file_exists("config.php")) {
exit; exit;
} }
require_once "config.php";
require_once "core/util.inc.php"; require_once "core/util.inc.php";
_version_check(); _version_check();
_sanitise_environment(); _sanitise_environment();