diff --git a/core/database.class.php b/core/database.class.php index 9fc69df5..0f249ed6 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -32,10 +32,26 @@ class Database { public function Database() { if(is_readable("config.php")) { require_once "config.php"; - $this->db = NewADOConnection($database_dsn); - $this->db->SetFetchMode(ADODB_FETCH_ASSOC); - $this->db->Execute("SET NAMES utf8"); // FIXME: mysql specific :| - $this->extensions = $this->db->GetAssoc("SELECT name, version FROM extensions"); + $this->db = @NewADOConnection($database_dsn); + if($this->db) { + $this->db->SetFetchMode(ADODB_FETCH_ASSOC); + $this->db->Execute("SET NAMES utf8"); // FIXME: mysql specific :| + $this->extensions = $this->db->GetAssoc("SELECT name, version FROM extensions"); + } + else { + $version = VERSION; + print " + +
+