includes/common.php
changeset 320 112debff64bd
parent 317 f8356d9c3481
child 322 5f1cd51bf1be
--- a/includes/common.php	Wed Dec 12 21:46:28 2007 -0500
+++ b/includes/common.php	Sat Dec 15 18:10:14 2007 -0500
@@ -151,7 +151,13 @@
 // The first thing we need to do is start the database connection. At this point, for all we know, Enano might not
 // even be installed. If this connection attempt fails and it's because of a missing or corrupt config file, the
 // user will be redirected (intelligently) to install.php.
-$db = new mysql();
+
+require(ENANO_ROOT . '/config.php');
+unset($dbuser, $dbpasswd);
+if ( !isset($dbdriver) )
+  $dbdriver = 'mysql';
+
+$db = new $dbdriver();
 $db->connect();
 
 // The URL separator is the character appended to contentPath + url_title type strings.