Commit b5de1873 authored by Crell's avatar Crell

Let getDriverClass() handle defaults, so that extenders work. Also use it in...

Let getDriverClass() handle defaults, so that extenders work. Also use it in more places, eliminating the old-school crappy approach.
parent 8f07a990
......@@ -589,7 +589,8 @@ protected function expandArguments(&$query, &$args) {
public function getDriverClass($class) {
if (empty($this->driverClasses[$class])) {
$driver = $this->driver();
$this->driverClasses[$class] = "Drupal\\Database\\Driver\\{$driver}\\{$class}";
$driver_class = "Drupal\\Database\\Driver\\{$driver}\\{$class}";
$this->driverClasses[$class] = class_exists($driver_class) ? $driver_class : $class;
}
return $this->driverClasses[$class];
}
......
......@@ -1010,6 +1010,6 @@ function db_run_tasks($driver) {
* The name of the driver.
*/
function db_installer_object($driver) {
$task_class = "Drupal\\Database\\Driver\\{$driver}\\Install\\Tasks";
return new $task_class();
$class = Database::getConnection()->getDriverClass('Install\\Tasks');
return new $class();
}
......@@ -182,7 +182,7 @@ function system_requirements($phase) {
}
else {
// Database information.
$class = 'DatabaseTasks_' . Database::getConnection()->driver();
$class = Database::getConnection()->getDriverClass('Install\\Tasks');
$tasks = new $class();
$requirements['database_system'] = array(
'title' => $t('Database system'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment