includes/common.php
changeset 1378 e58294b867c1
parent 1365 a52cac1b190d
equal deleted inserted replaced
1377:fa2b0825bbc5 1378:e58294b867c1
   215 @include(ENANO_ROOT . $config_file);
   215 @include(ENANO_ROOT . $config_file);
   216 unset($dbuser, $dbpasswd);
   216 unset($dbuser, $dbpasswd);
   217 if ( !isset($dbdriver) )
   217 if ( !isset($dbdriver) )
   218 	$dbdriver = 'mysql';
   218 	$dbdriver = 'mysql';
   219 
   219 
   220 $db = new $dbdriver();
   220 $dbdriver_cls = have_pdo($dbdriver) ? "{$dbdriver}_pdo" : $dbdriver;
       
   221 
       
   222 $db = new $dbdriver_cls();
   221 $db->connect();
   223 $db->connect();
   222 
   224 
   223 profiler_log('Database connected');
   225 profiler_log('Database connected');
   224 
   226 
   225 // The URL separator is the character appended to contentPath + url_title type strings.
   227 // The URL separator is the character appended to contentPath + url_title type strings.