includes/common.php
changeset 320 112debff64bd
parent 317 f8356d9c3481
child 322 5f1cd51bf1be
equal deleted inserted replaced
319:8be996c3740d 320:112debff64bd
   149 //
   149 //
   150 
   150 
   151 // The first thing we need to do is start the database connection. At this point, for all we know, Enano might not
   151 // The first thing we need to do is start the database connection. At this point, for all we know, Enano might not
   152 // even be installed. If this connection attempt fails and it's because of a missing or corrupt config file, the
   152 // even be installed. If this connection attempt fails and it's because of a missing or corrupt config file, the
   153 // user will be redirected (intelligently) to install.php.
   153 // user will be redirected (intelligently) to install.php.
   154 $db = new mysql();
   154 
       
   155 require(ENANO_ROOT . '/config.php');
       
   156 unset($dbuser, $dbpasswd);
       
   157 if ( !isset($dbdriver) )
       
   158   $dbdriver = 'mysql';
       
   159 
       
   160 $db = new $dbdriver();
   155 $db->connect();
   161 $db->connect();
   156 
   162 
   157 // The URL separator is the character appended to contentPath + url_title type strings.
   163 // The URL separator is the character appended to contentPath + url_title type strings.
   158 // If the contentPath has a ? in it, this should be an ampersand; else, it should be a
   164 // If the contentPath has a ? in it, this should be an ampersand; else, it should be a
   159 // question mark.
   165 // question mark.