summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-11-19 20:35:31 +0000
committerDries Buytaert <dries@buytaert.net>2010-11-19 20:35:31 +0000
commit203b6a88b2666352f2ed5d241b4ad738fde1e9bd (patch)
tree338c2036c2fc84db297110e3775bb110b0cef002 /modules
parent2b2f2796ce6553ce9b83735eab12afb5f5a4f0c7 (diff)
downloadbrdo-203b6a88b2666352f2ed5d241b4ad738fde1e9bd.tar.gz
brdo-203b6a88b2666352f2ed5d241b4ad738fde1e9bd.tar.bz2
- Patch #944198 by sun: functions that call drupal_system_listing() act on potentially invalid system items.
Diffstat (limited to 'modules')
-rw-r--r--modules/system/system.module6
1 files changed, 3 insertions, 3 deletions
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(