summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-07-31 12:29:31 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-07-31 12:29:31 +0000
commitf8dea099d7dab1585ad23debf923695f07b33af6 (patch)
treee79580d40e3b228a96ed9ba7239bb0f823a8d06d
parentbb28a4d4c814ec2995e2776e49df90fb0ce56a89 (diff)
downloadbrdo-f8dea099d7dab1585ad23debf923695f07b33af6.tar.gz
brdo-f8dea099d7dab1585ad23debf923695f07b33af6.tar.bz2
#853748 by Stevel, andypost: Fixed Folders in includes/database that do not contain an (installable) driver are used anyway.
-rw-r--r--includes/install.inc4
-rw-r--r--modules/system/system.install40
2 files changed, 24 insertions, 20 deletions
diff --git a/includes/install.inc b/includes/install.inc
index 40b352df5..92528d880 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -237,7 +237,9 @@ function drupal_detect_database_types() {
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) {
- $drivers[$file->filename] = $file->uri;
+ if (file_exists($file->uri . '/database.inc') && file_exists($file->uri . '/install.inc')) {
+ $drivers[$file->filename] = $file->uri;
+ }
}
foreach ($drivers as $driver => $file) {
diff --git a/modules/system/system.install b/modules/system/system.install
index cd2e9cb94..492df8365 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -141,27 +141,29 @@ function system_requirements($phase) {
$requirements['php_extensions']['value'] = $t('Enabled');
}
- // Test for PDO (database).
- $requirements['database_extensions'] = array(
- 'title' => $t('Database support'),
- );
+ if ($phase == 'install' || $phase == 'update') {
+ // Test for PDO (database).
+ $requirements['database_extensions'] = array(
+ 'title' => $t('Database support'),
+ );
- // Test for at least one suitable PDO extension, if PDO is available.
- $database_ok = extension_loaded('pdo');
- if ($database_ok) {
- $drivers = drupal_detect_database_types();
- $database_ok = !empty($drivers);
- }
+ // Test for at least one suitable PDO extension, if PDO is available.
+ $database_ok = extension_loaded('pdo');
+ if ($database_ok) {
+ $drivers = drupal_detect_database_types();
+ $database_ok = !empty($drivers);
+ }
- if (!$database_ok) {
- $requirements['database_extensions']['value'] = $t('Disabled');
- $requirements['database_extensions']['severity'] = REQUIREMENT_ERROR;
- $requirements['database_extensions']['description'] = $t('Your web server does not appear to support any common PDO database extensions. Check with your hosting provider to see if they support PDO (PHP Data Objects) and offer any databases that <a href="@drupal-databases">Drupal supports</a>.', array(
- '@drupal-databases' => 'http://drupal.org/node/270#database',
- ));
- }
- else {
- $requirements['database_extensions']['value'] = $t('Enabled');
+ if (!$database_ok) {
+ $requirements['database_extensions']['value'] = $t('Disabled');
+ $requirements['database_extensions']['severity'] = REQUIREMENT_ERROR;
+ $requirements['database_extensions']['description'] = $t('Your web server does not appear to support any common PDO database extensions. Check with your hosting provider to see if they support PDO (PHP Data Objects) and offer any databases that <a href="@drupal-databases">Drupal supports</a>.', array(
+ '@drupal-databases' => 'http://drupal.org/node/270#database',
+ ));
+ }
+ else {
+ $requirements['database_extensions']['value'] = $t('Enabled');
+ }
}
// Test PHP memory_limit