includes/common_cli.php
changeset 1378 e58294b867c1
parent 1365 a52cac1b190d
equal deleted inserted replaced
1377:fa2b0825bbc5 1378:e58294b867c1
    34 @include(ENANO_ROOT . $config_file);
    34 @include(ENANO_ROOT . $config_file);
    35 unset($dbuser, $dbpasswd);
    35 unset($dbuser, $dbpasswd);
    36 if ( !isset($dbdriver) )
    36 if ( !isset($dbdriver) )
    37 	$dbdriver = 'mysql';
    37 	$dbdriver = 'mysql';
    38 
    38 
    39 $db = new $dbdriver();
    39 $dbdriver_cls = have_pdo($dbdriver) ? "{$dbdriver}_pdo" : $dbdriver;
       
    40 
       
    41 $db = new $dbdriver_cls();
    40 $db->connect();
    42 $db->connect();
    41 
    43 
    42 profiler_log('Database connected');
    44 profiler_log('Database connected');
    43 
    45 
    44 // The URL separator is the character appended to contentPath + url_title type strings.
    46 // The URL separator is the character appended to contentPath + url_title type strings.