diff options
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.module | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index 5aaf97a63..89d6a7bef 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -954,11 +954,17 @@ function system_default_region($theme) { */ function system_listing($mask, $directory, $key = 'name', $min_depth = 1) { $config = conf_path(); + $profile = variable_get('install_profile', 'default'); $searchdir = array($directory); $files = array(); // Always search sites/all/* as well as the global directories $searchdir[] = 'sites/all'; + + if (file_exists("profiles/$profile/$directory")) { + $searchdir[] = "profiles/$profile/$directory"; + } + if (file_exists("$config/$directory")) { $searchdir[] = "$config/$directory"; } |