? .cache
? .git
? .project
? .settings
? drupal-file-inc-undefined-index-207736-2.patch
? empty
? file_74645_3.patch
? file_chmod_variable_1.patch
? ip.patch
? logs
? modules/file
? sites/all/modules
? sites/default/files
? sites/default/settings.php
? sites/default/test
Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal/drupal/CHANGELOG.txt,v
retrieving revision 1.285
diff -u -p -r1.285 CHANGELOG.txt
--- CHANGELOG.txt	2 Nov 2008 10:52:53 -0000	1.285
+++ CHANGELOG.txt	16 Nov 2008 11:57:27 -0000
@@ -1,4 +1,4 @@
-// $Id: CHANGELOG.txt,v 1.285 2008/11/02 10:52:53 dries Exp $
+// $Id: CHANGELOG.txt,v 1.286 2008/11/11 20:25:01 dries Exp $
 
 Drupal 7.0, xxxx-xx-xx (development version)
 ----------------------
@@ -111,6 +111,8 @@ Drupal 6.0, 2008-02-13
       ported to the correct core API version.
     * Can now specify the minimum PHP version required for a module within the
       .info file.
+    * Drupal core no longer requires CREATE TEMPORARY TABLES or LOCK TABLES
+      database rights.
     * Dynamically check password strength and confirmation.
     * Refactored poll administration.
     * Implemented drag-and-drop positioning for blocks, menu items, taxonomy
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.142
diff -u -p -r1.142 install.php
--- install.php	10 Nov 2008 05:22:56 -0000	1.142
+++ install.php	16 Nov 2008 11:57:39 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: install.php,v 1.142 2008/11/10 05:22:56 webchick Exp $
+// $Id: install.php,v 1.143 2008/11/16 04:38:14 webchick Exp $
 
 /**
  * Root directory of Drupal installation.
@@ -271,7 +271,6 @@ function install_settings_form(&$form_st
       '#default_value' => empty($database['username']) ? '' : $database['username'],
       '#size' => 45,
       '#maxlength' => 45,
-      '#required' => TRUE,
     );
 
     // Database username
@@ -410,7 +409,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$/', '/(\.\.?|CVS)$/', 0, TRUE, 'name', 0);
 }
 
 /**
@@ -496,7 +495,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$/', '/(\.\.?|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.824
diff -u -p -r1.824 common.inc
--- includes/common.inc	11 Nov 2008 22:39:58 -0000	1.824
+++ includes/common.inc	16 Nov 2008 11:58:36 -0000
@@ -2090,7 +2090,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_unmanaged_delete', TRUE);
+  file_scan_directory(file_create_path('css'), '/.*/', '/(\.\.?|CVS)$/', 'file_unmanaged_delete', TRUE);
 }
 
 /**
@@ -2527,7 +2527,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_unmanaged_delete', TRUE);
+  file_scan_directory(file_create_path('js'), '/.*/', '/(\.\.?|CVS)$/', 'file_unmanaged_delete', TRUE);
   variable_set('javascript_parsed', array());
 }
 
@@ -2898,7 +2898,7 @@ function drupal_system_listing($mask, $d
 
   // Get current list of items
   foreach ($searchdir as $dir) {
-    $files = array_merge($files, file_scan_directory($dir, $mask, array('.', '..', 'CVS'), 0, TRUE, $key, $min_depth));
+    $files = array_merge($files, file_scan_directory($dir, $mask, '/(\.\.?|CVS)$/', 0, TRUE, $key, $min_depth));
   }
 
   return $files;
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.143
diff -u -p -r1.143 file.inc
--- includes/file.inc	8 Nov 2008 22:04:03 -0000	1.143
+++ includes/file.inc	16 Nov 2008 11:58:43 -0000
@@ -1259,7 +1259,7 @@ function file_download() {
  * @param $mask
  *   The preg_match() regular expression of the files to find.
  * @param $nomask
- *   An array of files/directories to ignore.
+ *   The preg_match() regular expression of the files to ignore.
  * @param $callback
  *   The callback function to call for each match.
  * @param $recurse
@@ -1280,13 +1280,13 @@ function file_download() {
  *   "path", "basename", and "name" members corresponding to the
  *   matching files.
  */
-function file_scan_directory($dir, $mask, $nomask = array('.', '..', 'CVS'), $callback = 0, $recurse = TRUE, $key = 'filename', $min_depth = 0, $depth = 0) {
+function file_scan_directory($dir, $mask, $nomask = '/(\.\.?|CVS)$/', $callback = 0, $recurse = TRUE, $key = 'filename', $min_depth = 0, $depth = 0) {
   $key = (in_array($key, array('filename', 'basename', 'name')) ? $key : 'filename');
   $files = array();
 
   if (is_dir($dir) && $handle = opendir($dir)) {
     while (FALSE !== ($file = readdir($handle))) {
-      if (!in_array($file, $nomask) && $file[0] != '.') {
+      if (!preg_match($nomask, $file) && $file[0] != '.') {
         if (is_dir("$dir/$file") && $recurse) {
           // 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);
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.194
diff -u -p -r1.194 locale.inc
--- includes/locale.inc	11 Nov 2008 20:22:17 -0000	1.194
+++ includes/locale.inc	16 Nov 2008 11:59:02 -0000
@@ -2485,7 +2485,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$/', '/(\.\.?|CVS)$/', 0, FALSE));
     $components[] = $component->name;
   }
 
@@ -2517,7 +2517,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$/', '/(\.\.?|CVS)$/', 0, FALSE));
       }
     }
     return _locale_batch_build($files, $finished);
Index: modules/simpletest/tests/file.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/file.test,v
retrieving revision 1.11
diff -u -p -r1.11 file.test
--- modules/simpletest/tests/file.test	9 Nov 2008 05:38:50 -0000	1.11
+++ modules/simpletest/tests/file.test	16 Nov 2008 11:59:06 -0000
@@ -542,6 +542,38 @@ class FileDirectoryTest extends FileTest
 
 
 /**
+ * Tests the file_scan_directory() function.
+ */
+class FileScanDirectoryTest extends FileTestCase {
+  /**
+   * Implementation of getInfo().
+   */
+  function getInfo() {
+    return array(
+      'name' => t('File scan directory'),
+      'description' => t('Tests the file_scan_directory() function.'),
+      'group' => t('File'),
+    );
+  }
+
+  /**
+   * Check that the no-mask parameter is honored.
+   */
+  function testNoMask() {
+    $path = $this->original_file_directory . '/simpletest';
+
+    // Grab a listing of all the JS files.
+    $all_files = file_scan_directory($path, '/javascript*/');
+    $this->assertEqual(2, count($all_files), t('Found two, expected javascript files.'));
+
+    // Now use the nomast parameter to filter out the .script file.
+    $filtered_files = file_scan_directory($path, '/javascript*/', '/.script$/');
+    $this->assertEqual(1, count($filtered_files), t('Filtered correctly.'));
+  }
+}
+
+
+/**
  * Deletion related tests.
  */
 class FileUnmanagedDeleteTest extends FileTestCase {
