diff options
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 7ab4f2b65..191977f5c 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -677,11 +677,12 @@ function drupal_get_filename($type, $name, $filename = NULL) { $mask = "/$name\.$type$/"; } - if (function_exists('drupal_system_listing')) { - $matches = drupal_system_listing($mask, $dir, 'name', 0); - if (!empty($matches[$name]->uri)) { - $files[$type][$name] = $matches[$name]->uri; - } + if (!function_exists('drupal_system_listing')) { + require_once DRUPAL_ROOT . '/includes/common.inc'; + } + $matches = drupal_system_listing($mask, $dir, 'name', 0); + if (!empty($matches[$name]->uri)) { + $files[$type][$name] = $matches[$name]->uri; } } } |