? .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 -r1.130 install.php
--- install.php	15 Sep 2008 20:48:06 -0000	1.130
+++ install.php	16 Sep 2008 19:55:08 -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 -r1.794 common.inc
--- includes/common.inc	16 Sep 2008 17:50:01 -0000	1.794
+++ includes/common.inc	16 Sep 2008 19:55:08 -0000
@@ -646,7 +646,7 @@ function _drupal_get_last_caller($backtr
   // The first trace is the call itself.
   // It gives us the line and the file of the last call.
   $call = $backtrace[0];
-  
+
   // The second call give us the function where the call originated.
   if (isset($backtrace[1])) {
     if (isset($backtrace[1]['class'])) {
@@ -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 -r1.131 file.inc
--- includes/file.inc	15 Sep 2008 09:28:49 -0000	1.131
+++ includes/file.inc	16 Sep 2008 19:55:08 -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 -r1.68 install.inc
--- includes/install.inc	14 Sep 2008 01:58:17 -0000	1.68
+++ includes/install.inc	16 Sep 2008 19:55:08 -0000
@@ -88,7 +88,7 @@ function drupal_load_updates() {
  * @param $module
  *   A module name.
  * @return
- *   If the module has updates, an array of available updates sorted by version. 
+ *   If the module has updates, an array of available updates sorted by version.
  *   Otherwise, FALSE.
  */
 function drupal_get_schema_versions($module) {
@@ -105,10 +105,10 @@ function drupal_get_schema_versions($mod
   if (count($updates) == 0) {
     return FALSE;
   }
-  
+
   // Make sure updates are run in numeric order, not in definition order.
   sort($updates, SORT_NUMERIC);
-  
+
   return $updates;
 }
 
@@ -231,7 +231,7 @@ function drupal_detect_database_types() 
     unset($databases['mysql']);
     $databases = array('mysql' => $mysql_database) + $databases;
   }
-  
+
   return $databases;
 }
 
@@ -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;
   }
 
@@ -517,7 +517,7 @@ function _drupal_install_module($module)
  */
 function drupal_install_init_database() {
   static $included = FALSE;
-  
+
   if (!$included) {
     $connection_info = Database::getConnectionInfo();
     $driver = $connection_info['default']['driver'];
@@ -541,7 +541,7 @@ function drupal_install_system() {
   require_once './' . $system_path . '/system.install';
   drupal_install_init_database();
   module_invoke('system', 'install');
-  
+
   $system_versions = drupal_get_schema_versions('system');
   $system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED;
   db_query("INSERT INTO {system} (filename, name, type, owner, status, bootstrap, schema_version) VALUES('%s', '%s', '%s', '%s', %d, %d, %d)", $system_path . '/system.module', 'system', 'module', '', 1, 0, $system_version);
@@ -790,7 +790,7 @@ function drupal_install_fix_file($file, 
 
 
 /**
- * Send the user to a different installer page. 
+ * Send the user to a different installer page.
  *
  * This issues an on-site HTTP redirect. Messages (and errors) are erased.
  *
@@ -889,7 +889,7 @@ function drupal_check_profile($profile) 
  * Extract highest severity from requirements array.
  *
  * @param $requirements
- *   An array of requirements, in the same format as is returned by 
+ *   An array of requirements, in the same format as is returned by
  *   hook_requirements().
  * @return
  *   The highest severity in the array.
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.182
diff -u -p -r1.182 locale.inc
--- includes/locale.inc	15 Sep 2008 20:48:07 -0000	1.182
+++ includes/locale.inc	16 Sep 2008 19:55:08 -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 -r1.124 module.inc
--- includes/module.inc	21 Aug 2008 19:36:36 -0000	1.124
+++ includes/module.inc	16 Sep 2008 19:55:08 -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 -r1.3 registry.inc
--- includes/registry.inc	21 Aug 2008 19:36:36 -0000	1.3
+++ includes/registry.inc	16 Sep 2008 19:55:08 -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 -r1.435 theme.inc
--- includes/theme.inc	15 Sep 2008 20:48:07 -0000	1.435
+++ includes/theme.inc	16 Sep 2008 19:55:08 -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 -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 19:55:09 -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 -r1.8 simpletest.install
--- modules/simpletest/simpletest.install	10 Sep 2008 04:13:01 -0000	1.8
+++ modules/simpletest/simpletest.install	16 Sep 2008 19:55:09 -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 -r1.12 simpletest.module
--- modules/simpletest/simpletest.module	10 Sep 2008 04:13:01 -0000	1.12
+++ modules/simpletest/simpletest.module	16 Sep 2008 19:55:09 -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 -r1.619 system.module
--- modules/system/system.module	15 Sep 2008 08:49:40 -0000	1.619
+++ modules/system/system.module	16 Sep 2008 19:55:09 -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();
 
