diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-28 07:32:39 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-28 07:32:39 +0000 |
commit | cfb6ff4127c410699eb6e06c5460f5b0d12cb4e5 (patch) | |
tree | 382bc4736bcd53cc87cc0cb3fda03f19df4d412b /includes/install.inc | |
parent | 62bb48c4efc1600269d76923e437c5854c08502e (diff) | |
download | brdo-cfb6ff4127c410699eb6e06c5460f5b0d12cb4e5.tar.gz brdo-cfb6ff4127c410699eb6e06c5460f5b0d12cb4e5.tar.bz2 |
Rolling back #851136. Broke SQLite installation.
Diffstat (limited to 'includes/install.inc')
-rw-r--r-- | includes/install.inc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/includes/install.inc b/includes/install.inc index 977a65474..6e0b7dc7b 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -238,6 +238,7 @@ function drupal_detect_database_types() { // Because we have no registry yet, we need to also include the install.inc // file for the driver explicitly. require_once DRUPAL_ROOT . '/includes/database/database.inc'; + spl_autoload_register('db_autoload'); foreach (file_scan_directory(DRUPAL_ROOT . '/includes/database', '/^[a-z]*$/i', array('recurse' => FALSE)) as $file) { if (file_exists($file->uri . '/database.inc') && file_exists($file->uri . '/install.inc')) { $drivers[$file->filename] = $file->uri; @@ -245,7 +246,8 @@ function drupal_detect_database_types() { } foreach ($drivers as $driver => $file) { - $installer = db_installer_object($driver); + $class = 'DatabaseTasks_' . $driver; + $installer = new $class(); if ($installer->installable()) { $databases[$driver] = $installer->name(); } @@ -1121,18 +1123,8 @@ function install_profile_info($profile, $locale = 'en') { * encoding. */ function db_run_tasks($driver) { - db_installer_object($driver)->runTasks(); - return TRUE; -} - -/** - * Returns a database installer object. - * - * @param $driver - * The name of the driver. - */ -function db_installer_object($driver) { - Database::loadDriverFile($driver, array('install.inc')); $task_class = 'DatabaseTasks_' . $driver; - return new $task_class(); + $DatabaseTasks = new $task_class(); + $DatabaseTasks->runTasks(); + return TRUE; } |