From 203b6a88b2666352f2ed5d241b4ad738fde1e9bd Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 19 Nov 2010 20:35:31 +0000 Subject: - Patch #944198 by sun: functions that call drupal_system_listing() act on potentially invalid system items. --- modules/system/system.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/system') diff --git a/modules/system/system.module b/modules/system/system.module index 125169496..699f73a7f 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2284,7 +2284,7 @@ function system_get_info($type, $name = NULL) { */ function _system_rebuild_module_data() { // Find modules - $modules = drupal_system_listing('/\.module$/', 'modules', 'name', 0); + $modules = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules', 'name', 0); // Include the install profile in modules that are loaded. $profile = drupal_get_profile(); @@ -2404,9 +2404,9 @@ function _system_update_bootstrap_status() { */ function _system_rebuild_theme_data() { // Find themes - $themes = drupal_system_listing('/\.info$/', 'themes'); + $themes = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info$/', 'themes'); // Find theme engines - $engines = drupal_system_listing('/\.engine$/', 'themes/engines'); + $engines = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.engine$/', 'themes/engines'); // Set defaults for theme info. $defaults = array( -- cgit v1.2.3