diff --git a/includes/common.inc b/includes/common.inc index 0d4f3bb..0ae6e07 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -5516,10 +5516,10 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1) // The folders here are front-end related and they have been added to avoid // issues with Drupal recursive scanning. In this case, we added node_modules // and bower_components. This also improves performance on frontend builds. - $ignore_directories = array( + $ignore_directories = variable_get('ignore_directories', array( 'node_modules', 'bower_components', - ); + )); $no_mask = '/^(\..*)|' . implode('|', $ignore_directories) . '$/'; // Get current list of items. diff --git a/includes/file.inc b/includes/file.inc index af9ae66..8c95225 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -2108,10 +2108,10 @@ function file_scan_directory($dir, $mask, $options = array(), $depth = 0) { // The folders here are front-end related and they have been added to avoid // issues with Drupal recursive scanning. In this case, we added node_modules // and bower_components. This also improves performance on frontend builds. - $ignore_directories = array( + $ignore_directories = variable_get('ignore_directories', array( 'node_modules', 'bower_components', - ); + )); $no_mask = '/^(\..*)|' . implode('|', $ignore_directories) . '$/'; // Merge in defaults. $options += array( diff --git a/includes/theme.inc b/includes/theme.inc index 21016de..664458a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1330,10 +1330,10 @@ function drupal_find_theme_templates($cache, $extension, $path) { // The folders here are front-end related and they have been added to avoid // issues with Drupal recursive scanning. In this case, we added node_modules // and bower_components. This also improves performance on frontend builds. - $ignore_directories = array( + $ignore_directories = variable_get('ignore_directories', array( 'node_modules', 'bower_components', - ); + )); $no_mask = '/^(\..*)|' . implode('|', $ignore_directories) . '$/'; // Get a listing of all template files in the path to search.