diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 6715fe792..15104c340 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3672,6 +3672,12 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1) $searchdir[] = "$config/$directory"; } + // If the database is not available, we can't use drupal_function_exists(), so + // we load the file_scan_directory function definition manually. + if (!function_exists('file_scan_directory')) { + require_once DRUPAL_ROOT . '/includes/file.inc'; + } + // Get current list of items foreach ($searchdir as $dir) { $files = array_merge($files, file_scan_directory($dir, $mask, array('key' => $key, 'min_depth' => $min_depth))); |