? .DS_Store ? .cache ? .git ? .project ? .settings ? empty ? logs ? sites/all/modules ? sites/default/files ? sites/default/settings.php ? sites/default/test Index: install.php =================================================================== RCS file: /cvs/drupal/drupal/install.php,v retrieving revision 1.130 diff -u -p -w -r1.130 install.php --- install.php 15 Sep 2008 20:48:06 -0000 1.130 +++ install.php 16 Sep 2008 20:25:32 -0000 @@ -401,7 +401,7 @@ function install_settings_form_submit($f * Find all .profile files. */ function install_find_profiles() { - return file_scan_directory('./profiles', '\.profile$', array('.', '..', 'CVS'), 0, TRUE, 'name', 0); + return file_scan_directory('./profiles', '/\.profile$/', array('.', '..', 'CVS'), 0, TRUE, 'name', 0); } /** @@ -487,7 +487,7 @@ function install_select_profile_form(&$f * Find all .po files for the current profile. */ function install_find_locales($profilename) { - $locales = file_scan_directory('./profiles/' . $profilename . '/translations', '\.po$', array('.', '..', 'CVS'), 0, FALSE); + $locales = file_scan_directory('./profiles/' . $profilename . '/translations', '/\.po$/', array('.', '..', 'CVS'), 0, FALSE); array_unshift($locales, (object) array('name' => 'en')); return $locales; } Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.794 diff -u -p -w -r1.794 common.inc --- includes/common.inc 16 Sep 2008 17:50:01 -0000 1.794 +++ includes/common.inc 16 Sep 2008 20:25:32 -0000 @@ -1946,7 +1946,7 @@ function _drupal_load_stylesheet($matche * Delete all cached CSS files. */ function drupal_clear_css_cache() { - file_scan_directory(file_create_path('css'), '.*', array('.', '..', 'CVS'), 'file_delete', TRUE); + file_scan_directory(file_create_path('css'), '/.*/', array('.', '..', 'CVS'), 'file_delete', TRUE); } /** @@ -2319,7 +2319,7 @@ function drupal_build_js_cache($files, $ * Delete all cached JS files. */ function drupal_clear_js_cache() { - file_scan_directory(file_create_path('js'), '.*', array('.', '..', 'CVS'), 'file_delete', TRUE); + file_scan_directory(file_create_path('js'), '/.*/', array('.', '..', 'CVS'), 'file_delete', TRUE); variable_set('javascript_parsed', array()); } @@ -2645,7 +2645,7 @@ function drupal_cron_cleanup() { * version will be included. * * @param $mask - * The regular expression of the files to find. + * The preg_match() regular expression of the files to find. * @param $directory * The subdirectory name in which the files are found. For example, * 'modules' will search in both modules/ and Index: includes/file.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/file.inc,v retrieving revision 1.131 diff -u -p -w -r1.131 file.inc --- includes/file.inc 15 Sep 2008 09:28:49 -0000 1.131 +++ includes/file.inc 16 Sep 2008 20:25:32 -0000 @@ -963,7 +963,7 @@ function file_download() { * @param $dir * The base directory for the scan, without trailing slash. * @param $mask - * The regular expression of the files to find. + * The preg_match() regular expression of the files to find. * @param $nomask * An array of files/directories to ignore. * @param $callback @@ -998,7 +998,7 @@ function file_scan_directory($dir, $mask // Give priority to files in this folder by merging them in after any subdirectory files. $files = array_merge(file_scan_directory("$dir/$file", $mask, $nomask, $callback, $recurse, $key, $min_depth, $depth + 1), $files); } - elseif ($depth >= $min_depth && ereg($mask, $file)) { + elseif ($depth >= $min_depth && preg_match($mask, $file)) { // Always use this match over anything already set in $files with the // same $$key. $filename = "$dir/$file"; Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.68 diff -u -p -w -r1.68 install.inc --- includes/install.inc 14 Sep 2008 01:58:17 -0000 1.68 +++ includes/install.inc 16 Sep 2008 20:25:32 -0000 @@ -409,7 +409,7 @@ function drupal_rewrite_settings($settin function drupal_get_install_files($module_list = array()) { $installs = array(); foreach ($module_list as $module) { - $installs = array_merge($installs, drupal_system_listing($module . '.install$', 'modules')); + $installs = array_merge($installs, drupal_system_listing('/'. $module . '.install$/', 'modules')); } return $installs; } @@ -442,7 +442,7 @@ function drupal_verify_profile($profile, // Get a list of modules that exist in Drupal's assorted subdirectories. $present_modules = array(); - foreach (drupal_system_listing('\.module$', 'modules', 'name', 0) as $present_module) { + foreach (drupal_system_listing('/\.module$/', 'modules', 'name', 0) as $present_module) { $present_modules[] = $present_module->name; } Index: includes/locale.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/locale.inc,v retrieving revision 1.182 diff -u -p -w -r1.182 locale.inc --- includes/locale.inc 15 Sep 2008 20:48:07 -0000 1.182 +++ includes/locale.inc 16 Sep 2008 20:25:32 -0000 @@ -2479,7 +2479,7 @@ function locale_batch_by_language($langc // with names ending with $langcode.po. This allows for filenames // like node-module.de.po to let translators use small files and // be able to import in smaller chunks. - $files = array_merge($files, file_scan_directory(dirname($component->filename) . '/translations', '(^|\.)' . $langcode . '\.po$', array('.', '..', 'CVS'), 0, FALSE)); + $files = array_merge($files, file_scan_directory(dirname($component->filename) . '/translations', '/(^|\.)' . $langcode . '\.po$/', array('.', '..', 'CVS'), 0, FALSE)); $components[] = $component->name; } @@ -2511,7 +2511,7 @@ function locale_batch_by_component($comp // as $langcode.po or with names ending with $langcode.po. This allows // for filenames like node-module.de.po to let translators use small // files and be able to import in smaller chunks. - $files = array_merge($files, file_scan_directory(dirname($component->filename) . '/translations', '(^|\.)(' . $language_list . ')\.po$', array('.', '..', 'CVS'), 0, FALSE)); + $files = array_merge($files, file_scan_directory(dirname($component->filename) . '/translations', '/(^|\.)(' . $language_list . ')\.po$/', array('.', '..', 'CVS'), 0, FALSE)); } } return _locale_batch_build($files, $finished); Index: includes/module.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/module.inc,v retrieving revision 1.124 diff -u -p -w -r1.124 module.inc --- includes/module.inc 21 Aug 2008 19:36:36 -0000 1.124 +++ includes/module.inc 16 Sep 2008 20:25:32 -0000 @@ -80,7 +80,7 @@ function module_list($refresh = FALSE, $ */ function module_rebuild_cache() { // Get current list of modules - $files = drupal_system_listing('\.module$', 'modules', 'name', 0); + $files = drupal_system_listing('/\.module$/', 'modules', 'name', 0); // Extract current files from database. system_get_files_database($files, 'module'); Index: includes/registry.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/registry.inc,v retrieving revision 1.3 diff -u -p -w -r1.3 registry.inc --- includes/registry.inc 21 Aug 2008 19:36:36 -0000 1.3 +++ includes/registry.inc 16 Sep 2008 20:25:33 -0000 @@ -49,7 +49,7 @@ function _registry_rebuild() { } } } - foreach (file_scan_directory('includes', '\.inc$') as $filename => $file) { + foreach (file_scan_directory('includes', '/\.inc$/') as $filename => $file) { $files["./$filename"] = array(); } Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.435 diff -u -p -w -r1.435 theme.inc --- includes/theme.inc 15 Sep 2008 20:48:07 -0000 1.435 +++ includes/theme.inc 16 Sep 2008 20:25:33 -0000 @@ -790,7 +790,7 @@ function drupal_find_theme_templates($ca $subtheme_paths = isset($theme_paths[$theme]) ? $theme_paths[$theme] : array(); // Escape the periods in the extension. - $regex = str_replace('.', '\.', $extension) . '$'; + $regex = '/'. str_replace('.', '\.', $extension) . '$/'; // Because drupal_system_listing works the way it does, we check for real // templates separately from checking for patterns. $files = drupal_system_listing($regex, $path, 'name', 0); Index: modules/simpletest/drupal_web_test_case.php =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v retrieving revision 1.39 diff -u -p -w -r1.39 drupal_web_test_case.php --- modules/simpletest/drupal_web_test_case.php 14 Sep 2008 06:46:34 -0000 1.39 +++ modules/simpletest/drupal_web_test_case.php 16 Sep 2008 20:25:33 -0000 @@ -467,7 +467,7 @@ class DrupalWebTestCase { if (in_array($type, array('binary', 'html', 'image', 'javascript', 'php', 'sql', 'text'))) { // Use original file directory instead of one created during setUp(). $path = $this->original_file_directory . '/simpletest'; - $files = file_scan_directory($path, $type . '\-.*'); + $files = file_scan_directory($path, '/' . $type . '\-.*/'); // If size is set then remove any files that are not of that size. if ($size !== NULL) { Index: modules/simpletest/simpletest.install =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.install,v retrieving revision 1.8 diff -u -p -w -r1.8 simpletest.install --- modules/simpletest/simpletest.install 10 Sep 2008 04:13:01 -0000 1.8 +++ modules/simpletest/simpletest.install 16 Sep 2008 20:25:33 -0000 @@ -28,10 +28,10 @@ function simpletest_install() { } // Copy other test files for consistency. - $files = file_scan_directory($path, '(html|image|javascript|php|sql)-.*'); + $files = file_scan_directory($path, '/(html|image|javascript|php|sql)-.*/'); if (count($files) == 0) { $original = drupal_get_path('module', 'simpletest') . '/files'; - $files = file_scan_directory($original, '(html|image|javascript|php|sql)-.*'); + $files = file_scan_directory($original, '/(html|image|javascript|php|sql)-.*/'); foreach ($files as $file) { file_copy($file->filename, $path . '/' . $file->basename); } Index: modules/simpletest/simpletest.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v retrieving revision 1.12 diff -u -p -w -r1.12 simpletest.module --- modules/simpletest/simpletest.module 10 Sep 2008 04:13:01 -0000 1.12 +++ modules/simpletest/simpletest.module 16 Sep 2008 20:25:33 -0000 @@ -422,7 +422,7 @@ function simpletest_get_all_tests() { $tests_directory = $module_path . '/tests'; if (is_dir($tests_directory)) { - foreach (file_scan_directory($tests_directory, '\.test$') as $file) { + foreach (file_scan_directory($tests_directory, '/\.test$/') as $file) { $files[] = $file->filename; } } Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.619 diff -u -p -w -r1.619 system.module --- modules/system/system.module 15 Sep 2008 08:49:40 -0000 1.619 +++ modules/system/system.module 16 Sep 2008 20:25:33 -0000 @@ -1003,9 +1003,9 @@ function _system_theme_data() { if (empty($themes_info)) { // Find themes - $themes = drupal_system_listing('\.info$', 'themes'); + $themes = drupal_system_listing('/\.info$/', 'themes'); // Find theme engines - $engines = drupal_system_listing('\.engine$', 'themes/engines'); + $engines = drupal_system_listing('/\.engine$/', 'themes/engines'); $defaults = system_theme_default();