diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-03-08 22:06:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-03-08 22:06:11 +0000 |
commit | 3becbd89973a80fd9053aa24b6467c0003416d8e (patch) | |
tree | 610da8db3b095cc7ca0f8075b10a3bdb9b44cf87 /modules/system/system.module | |
parent | 9d8badb8de94b2f7b6c26cb7f6a11998bad36f3b (diff) | |
download | brdo-3becbd89973a80fd9053aa24b6467c0003416d8e.tar.gz brdo-3becbd89973a80fd9053aa24b6467c0003416d8e.tar.bz2 |
- Patch #16914 by chx: avoid that putting a .theme file directly in './themes'
breaks your Drupal. Only themes in './themes/subdir' are picked up now.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r-- | modules/system/system.module | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index 5f38a895c..3583100fe 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -395,11 +395,13 @@ function system_theme_data() { * sites/somesite/modules/. * @param $key * The key to be passed to file_scan_directory(). + * @param $min_depth + * Minimum depth of directories to return files from. * * @return * An array of file objects of the specified type. */ -function system_listing($mask, $directory, $key = 'name') { +function system_listing($mask, $directory, $key = 'name', $min_depth = 1) { $config = conf_init(); $searchdir = array($directory); $files = array(); @@ -410,7 +412,7 @@ function system_listing($mask, $directory, $key = 'name') { // Get current list of items foreach ($searchdir as $dir) { - $files = array_merge($files, file_scan_directory($dir, $mask, array('.', '..', 'CVS'), 0, TRUE, $key)); + $files = array_merge($files, file_scan_directory($dir, $mask, array('.', '..', 'CVS'), 0, TRUE, $key, $min_depth)); } return $files; @@ -456,7 +458,7 @@ function system_theme_listing() { */ function system_module_listing() { // Get current list of modules - $files = system_listing('\.module$', 'modules'); + $files = system_listing('\.module$', 'modules', 'name', 0); // Extract current files from database. system_get_files_database($files, 'module'); |