diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-10-24 18:21:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-10-24 18:21:54 +0000 |
commit | f67cddb49bb0df3ec6f6774108133d471c113f85 (patch) | |
tree | 89c018ff3381859c8f24e20a1704659e2b673bea /includes/install.inc | |
parent | de8ff4adb049334317bf91a4abf1b6940f86e8c0 (diff) | |
download | brdo-f67cddb49bb0df3ec6f6774108133d471c113f85.tar.gz brdo-f67cddb49bb0df3ec6f6774108133d471c113f85.tar.bz2 |
- Patch #302596 by dropcube: remove glob() because it is not available on all supported platforms.
Diffstat (limited to 'includes/install.inc')
-rw-r--r-- | includes/install.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/install.inc b/includes/install.inc index 164002a9c..c713036ff 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -211,10 +211,11 @@ function drupal_detect_database_types() { // without modifying the installer. // Because we have no registry yet, we need to also include the install.inc // file for the driver explicitly. - foreach (glob(DRUPAL_ROOT . '/includes/database/*/{install,database}.inc', GLOB_BRACE) as $file) { - include_once $file; - $dir_parts = explode('/', $file, -1); - $drivers[end($dir_parts)] = $file; + + foreach (file_scan_directory(DRUPAL_ROOT . '/includes/database', '/^[a-z]*$/i', array('.', '..', 'CVS'), 0, FALSE) as $file) { + include_once "{$file->filename}/install.inc"; + include_once "{$file->filename}/database.inc"; + $drivers[$file->basename] = $file->filename; } foreach ($drivers as $driver => $file) { |