? sites/default/files
? sites/default/settings.php
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.126
diff -u -p -r1.126 install.php
--- install.php	21 Aug 2008 19:36:35 -0000	1.126
+++ install.php	25 Aug 2008 17:05:40 -0000
@@ -617,7 +617,7 @@ function install_tasks($profile, $task) 
   // Bootstrap newly installed Drupal, while preserving existing messages.
   $messages = isset($_SESSION['messages']) ? $_SESSION['messages'] : '';
   drupal_install_init_database();
-  
+
   drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
   $_SESSION['messages'] = $messages;
 
Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.66
diff -u -p -r1.66 install.inc
--- includes/install.inc	25 Aug 2008 07:47:12 -0000	1.66
+++ includes/install.inc	25 Aug 2008 17:05:42 -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;
 }
 
@@ -509,7 +509,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'];
@@ -533,7 +533,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);
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.180
diff -u -p -r1.180 locale.inc
--- includes/locale.inc	21 Aug 2008 19:36:36 -0000	1.180
+++ includes/locale.inc	25 Aug 2008 17:05:42 -0000
@@ -2091,11 +2091,11 @@ function _locale_rebuild_js($langcode = 
 
   // Construct the array for JavaScript translations.
   // We sort on plural so that we have all plural forms before singular forms.
-  $result = db_query("SELECT s.lid, s.source, t.plid, t.plural, t.translation 
-    FROM {locales_source} s 
-      LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language 
-    WHERE s.location LIKE '%.js%' 
-      AND s.textgroup = 'default' 
+  $result = db_query("SELECT s.lid, s.source, t.plid, t.plural, t.translation
+    FROM {locales_source} s
+      LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language
+    WHERE s.location LIKE '%.js%'
+      AND s.textgroup = 'default'
     ORDER BY t.plural DESC", array(':language' => $language->language));
 
   $translations = $plurals = array();
Index: includes/database/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/database.inc,v
retrieving revision 1.1
diff -u -p -r1.1 database.inc
--- includes/database/database.inc	21 Aug 2008 19:36:36 -0000	1.1
+++ includes/database/database.inc	25 Aug 2008 17:05:43 -0000
@@ -54,59 +54,59 @@ define('DB_ERROR', 'a515ac9c2796ca0e23ad
  * database servers, so that is abstracted into db_query_range() arguments.
  * Finally, note the PDO-based ability to foreach() over the result set.
  *
- * 
- * All queries are passed as a prepared statement string.  A 
+ *
+ * All queries are passed as a prepared statement string.  A
  * prepared statement is a "template" of a query that omits literal or variable
- * values in favor of placeholders.  The values to place into those 
- * placeholders are passed separately, and the database driver handles 
+ * values in favor of placeholders.  The values to place into those
+ * placeholders are passed separately, and the database driver handles
  * inserting the values into the query in a secure fashion.  That means you
  * should never quote or string-escape a value to be inserted into the query.
- * 
+ *
  * There are two formats for placeholders: named and unnamed.  Named placeholders
- * are strongly preferred in all cases as they are more flexible and 
+ * are strongly preferred in all cases as they are more flexible and
  * self-documenting.
- * 
+ *
  * Named placeholders begin with a colon followed by a unique string. Example:
  * @code
  * SELECT nid, title FROM {node} WHERE uid=:uid
  * @endcode
- * 
+ *
  * ":uid" is a placeholder that will be replaced with a literal value when
  * the query is executed.  A given placeholder label cannot be repeated in a
  * given query, even if the value should be the same.  When using named
  * placeholders, the array of arguments to the query must be an associative
  * array where keys are a placeholder label (e.g., :uid) and the value is the
  * corresponding value to use.  The array may be in any order.
- * 
+ *
  * Unnamed placeholders are simply a question mark.  Example:
  * @code
  * SELECT nid, title FROM {node} WHERE uid=?
  * @endcode
- * 
+ *
  * In this case, the array of arguments must be an indexed array of values to
- * use in the exact same order as the placeholders in the query.  
- * 
+ * use in the exact same order as the placeholders in the query.
+ *
  * Note that placeholders should be a "complete" value.  For example, when
  * running a LIKE query the SQL wildcard character, %, should be part of the
  * value, not the query itself.  Thus, the following is incorrect:
- * 
+ *
  * @code
  * SELECT nid, title FROM {node} WHERE title LIKE :title%
  * @endcode
- * 
+ *
  * It should instead read:
- * 
+ *
  * @code
  * SELECT nid, title FROM {node} WHERE title LIKE :title
  * @endcode
- * 
+ *
  * and the value for :title should include a % as appropriate.  Again, note the
  * lack of quotation marks around :title.  Because the value is not inserted
  * into the query as one big string but as an explicitly separate value, the
- * database server knows where the query ends and a value begins.  That is 
- * considerably more secure against SQL injection than trying to remember 
+ * database server knows where the query ends and a value begins.  That is
+ * considerably more secure against SQL injection than trying to remember
  * which values need quotation marks and string escaping and which don't.
- * 
+ *
  *
  * INSERT, UPDATE, and DELETE queries need special care in order to behave
  * consistently across all different databases.  Therefore, they use a special
@@ -120,7 +120,7 @@ define('DB_ERROR', 'a515ac9c2796ca0e23ad
  * db_insert('my_table')->fields($fields)->execute();
  * @endcode
  * This method allows databases that need special data type handling to do so,
- * while also allowing optimizations such as multi-insert queries.  UPDATE and 
+ * while also allowing optimizations such as multi-insert queries.  UPDATE and
  * DELETE queries have a similar pattern.
  */
 
@@ -155,48 +155,48 @@ abstract class DatabaseConnection extend
   /**
    * Return the default query options for any given query.
    *
-   * A given query can be customized with a number of option flags in an 
+   * A given query can be customized with a number of option flags in an
    * associative array.
    *
-   *   target - The database "target" against which to execute a query.  Valid 
-   *   values are "default" or "slave".  The system will first try to open a 
-   *   connection to a database specified with the user-supplied key.  If one 
-   *   is not available, it will silently fall back to the "default" target.  
-   *   If multiple databases connections are specified with the same target, 
+   *   target - The database "target" against which to execute a query.  Valid
+   *   values are "default" or "slave".  The system will first try to open a
+   *   connection to a database specified with the user-supplied key.  If one
+   *   is not available, it will silently fall back to the "default" target.
+   *   If multiple databases connections are specified with the same target,
    *   one will be selected at random for the duration of the request.
-   * 
+   *
    *   fetch - This element controls how rows from a result set will be returned.
    *   legal values include PDO::FETCH_ASSOC, PDO::FETCH_BOTH, PDO::FETCH_OBJ,
    *   PDO::FETCH_NUM, or a string representing the name of a class.  If a string
    *   is specified, each record will be fetched into a new object of that class.
    *   The behavior of all other values is defined by PDO.  See
    *   http://www.php.net/PDOStatement-fetch
-   * 
+   *
    *   return - Depending on the type of query, different return values may be
    *   meaningful.  This directive instructs the system which type of return
-   *   value is desired.  The system will generally set the correct value 
+   *   value is desired.  The system will generally set the correct value
    *   automatically, so it is extremely rare that a module developer will ever
    *   need to specify this value.  Setting it incorrectly will likely lead to
    *   unpredictable results or fatal errors.  Legal values include:
-   *   
+   *
    *     Database::RETURN_STATEMENT - Return the prepared statement object for the
    *     query.  This is usually only meaningful for SELECT queries, where the
    *     statement object is how one accesses the result set returned by the query.
-   * 
-   *     Database::RETURN_AFFECTED - Return the number of rows affected by an 
-   *     UPDATE or DELETE query.  Be aware that means the number of rows 
+   *
+   *     Database::RETURN_AFFECTED - Return the number of rows affected by an
+   *     UPDATE or DELETE query.  Be aware that means the number of rows
    *     actually changed, not the number of rows matched by the WHERE clause.
-   *    
+   *
    *     Database::RETURN_INSERT_ID - Return the sequence ID (primary key)
    *     created by an INSERT statement on a table that contains a serial column.
-   * 
+   *
    *     Database::RETURN_NULL - Do not return anything, as there is no
    *     meaningful value to return.  That is the case for INSERT queries on
    *     tables that do not contain a serial column.
    *
-   *   throw_exception - By default, the database system will catch any errors 
-   *   on a query as an Exception, log it, and then rethrow it so that code 
-   *   further up the call chain can take an appropriate action.  To supress 
+   *   throw_exception - By default, the database system will catch any errors
+   *   on a query as an Exception, log it, and then rethrow it so that code
+   *   further up the call chain can take an appropriate action.  To supress
    *   that behavior and simply return NULL on failure, set this option to FALSE.
    *
    * @return
@@ -216,7 +216,7 @@ abstract class DatabaseConnection extend
    *
    * Queries sent to Drupal should wrap all table names in curly brackets. This
    * function searches for this syntax and adds Drupal's table prefix to all
-   * tables, allowing Drupal to coexist with other systems in the same database 
+   * tables, allowing Drupal to coexist with other systems in the same database
    * if necessary.
    *
    * @param $sql
@@ -250,7 +250,7 @@ abstract class DatabaseConnection extend
 
   /**
    * Prepare a query string and return the prepared statement.
-   * 
+   *
    * This method statically caches prepared statements, reusing them when
    * possible.  It also prefixes tables names enclosed in curly-braces.
    *
@@ -271,10 +271,10 @@ abstract class DatabaseConnection extend
 
   /**
    * Create the appropriate sequence name for a given table and serial field.
-   * 
+   *
    * This information is exposed to all database drivers, although it is only
    * useful on some of them.  This method is table prefix-aware.
-   * 
+   *
    * @param $table
    *   The table name to use for the sequence.
    * @param $field
@@ -285,7 +285,7 @@ abstract class DatabaseConnection extend
   public function makeSequenceName($table, $field) {
     return $this->prefixTables('{'. $table .'}_'. $field .'_seq');
   }
-  
+
   /**
    * Executes a query string against the database.
    *
@@ -293,16 +293,16 @@ abstract class DatabaseConnection extend
    * of every query.  All queries executed by Drupal are executed as
    * PDO prepared statements.  This method statically caches those
    * prepared statements, reusing them when possible.
-   * 
+   *
    * @param $query
    *   The query to execute.  In most cases this will be a string containing
-   *   an SQL query with placeholders.  An already-prepared instance of 
+   *   an SQL query with placeholders.  An already-prepared instance of
    *   DatabaseStatement may also be passed in order to allow calling code
    *   to manually bind variables to a query.  If a DatabaseStatement object
    *   is passed, the $args array will be ignored.
-   * 
-   *   It is extremely rare that module code will need to pass a statement 
-   *   object to this method.  It is used primarily for database drivers for 
+   *
+   *   It is extremely rare that module code will need to pass a statement
+   *   object to this method.  It is used primarily for database drivers for
    *   databases that require special LOB field handling.
    * @param $args
    *   An array of arguments for the prepared statement.  If the prepared
@@ -323,7 +323,7 @@ abstract class DatabaseConnection extend
 
     // Use default values if not already set.
     $options += $this->defaultOptions();
-    
+
     try {
       // We allow either a pre-bound statement object or a literal string.
       // In either case, we want to end up with an executed statement object.
@@ -335,7 +335,7 @@ abstract class DatabaseConnection extend
         $stmt = $this->prepareQuery($query);
         $stmt->execute($args, $options);
       }
-      
+
       // Depending on the type of query we may need to return a different value.
       // See DatabaseConnection::defaultOptions() for a description of each value.
       switch ($options['return']) {
@@ -516,11 +516,11 @@ abstract class DatabaseConnection extend
    */
   public function startTransaction($required = FALSE) {
     static $class_type;
-    
+
     if ($required && !$this->supportsTransactions()) {
       throw new TransactionsNotSupportedException();
     }
-  
+
     if (empty($class_type)) {
       $class_type = 'DatabaseTransaction_' . $this->driver();
       if (!class_exists($class_type)) {
@@ -599,7 +599,7 @@ abstract class DatabaseConnection extend
    */
   abstract public function databaseType();
 
- 
+
   /**
    * Gets any special processing requirements for the condition operator.
    *
@@ -629,13 +629,13 @@ abstract class Database {
 
   /**
    * Flag to indicate a query call should simply return NULL.
-   * 
+   *
    * This is used for queries that have no reasonable return value
    * anyway, such as INSERT statements to a table without a serial
    * primary key.
    */
   const RETURN_NULL = 0;
-  
+
   /**
    * Flag to indicate a query call should return the prepared statement.
    */
@@ -645,12 +645,12 @@ abstract class Database {
    * Flag to indicate a query call should return the number of affected rows.
    */
   const RETURN_AFFECTED = 2;
-  
+
   /**
    * Flag to indicate a query call should return the "last insert id".
    */
   const RETURN_INSERT_ID = 3;
-  
+
   /**
    * An nested array of all active connections.  It is keyed by database name and target.
    *
@@ -735,7 +735,7 @@ abstract class Database {
 
   /**
    * Process the configuration file for database information.
-   * 
+   *
    * Because the config file accepts various "fallback" configurations, we have
    * to parse the configuration array out into a standardized "complete" form,
    * applying defaults where necessary.
@@ -760,8 +760,8 @@ abstract class Database {
       }
 
       foreach ($databaseInfo[$index] as $target => $value) {
-        // If there is no "driver" property, then we assume it's an array of 
-        // possible connections for this target.  Pick one at random.  That 
+        // If there is no "driver" property, then we assume it's an array of
+        // possible connections for this target.  Pick one at random.  That
         // allows us to have, for example, multiple slave servers.
         if (empty($value['driver'])) {
           $databaseInfo[$index][$target] = $databaseInfo[$index][$target][mt_rand(0, count($databaseInfo[$index][$target]) - 1)];
@@ -771,7 +771,7 @@ abstract class Database {
 
     self::$databaseInfo = $databaseInfo;
   }
-  
+
   /**
    * Gets information on the specified database connection.
    *
@@ -786,7 +786,7 @@ abstract class Database {
     if (!empty(self::$databaseInfo[$key])) {
       return self::$databaseInfo[$key];
     }
-    
+
   }
 
   /**
@@ -797,7 +797,7 @@ abstract class Database {
    *   is "default".
    * @param $target
    *   The database target to open.  If the specified target does not exist,
-   *   the "default" target will be used instead.  
+   *   the "default" target will be used instead.
    */
   final protected static function openConnection($key, $target) {
     global $db_prefix;
@@ -821,7 +821,7 @@ abstract class Database {
       if (!$driver = self::$databaseInfo[$key][$target]['driver']) {
         throw new Exception('Drupal is not set up');
       }
-      
+
       // We cannot rely on the registry yet, because the registry requires
       // an open database connection.
       $driver_class = 'DatabaseConnection_' . $driver;
@@ -847,8 +847,8 @@ abstract class Database {
 
 /**
  * Exception to mark databases that do not support transations.
- * 
- * This exception will be thrown when a transaction is started that does not 
+ *
+ * This exception will be thrown when a transaction is started that does not
  * allow for the "silent fallback" of no transaction and the database connection
  * in use does not support transactions.  The calling code must then take
  * appropriate action.
@@ -908,7 +908,7 @@ class DatabaseTransaction {
 
   /**
    * Track the number of "layers" of transactions currently active.
-   * 
+   *
    * On many databases transactions cannot nest.  Instead, we track
    * nested calls to transactions and collapse them into a single
    * transaction.
@@ -916,7 +916,7 @@ class DatabaseTransaction {
    * @var int
    */
   protected static $layers = 0;
-  
+
   public function __construct(DatabaseConnection $connection) {
     $this->connection = $connection;
     $this->supportsTransactions = $connection->supportsTransactions();
@@ -924,7 +924,7 @@ class DatabaseTransaction {
     if (self::$layers == 0 && $this->supportsTransactions) {
       $connection->beginTransaction();
     }
-    
+
     ++self::$layers;
   }
 
@@ -971,9 +971,9 @@ class DatabaseTransaction {
 /**
  * Prepared statement class.
  *
- * PDO allows us to extend the PDOStatement class to provide additional 
- * functionality beyond that offered by default.  We do need extra 
- * functionality.  By default, this class is not driver-specific.  If a given 
+ * PDO allows us to extend the PDOStatement class to provide additional
+ * functionality beyond that offered by default.  We do need extra
+ * functionality.  By default, this class is not driver-specific.  If a given
  * driver needs to set a custom statement class, it may do so in its constructor.
  *
  * @link http://us.php.net/pdostatement
@@ -982,7 +982,7 @@ class DatabaseStatement extends PDOState
 
   /**
    * Reference to the database connection object for this statement.
-   * 
+   *
    * The name $dbh is inherited from PDOStatement.
    *
    * @var DatabaseConnection
@@ -1033,8 +1033,8 @@ class DatabaseStatement extends PDOState
 
   /**
    * Returns an entire result set as an associative array keyed by the named field.
-   * 
-   * If the given key appears multiple times, later records will overwrite 
+   *
+   * If the given key appears multiple times, later records will overwrite
    * earlier ones.
    *
    * Note that this method will run the result set to the end.
@@ -1042,7 +1042,7 @@ class DatabaseStatement extends PDOState
    * @param $key
    *   The name of the field on which to index the array.
    * @param $fetch
-   *   The fetchmode to use.  If set to   PDO::FETCH_ASSOC, PDO::FETCH_NUM, or 
+   *   The fetchmode to use.  If set to   PDO::FETCH_ASSOC, PDO::FETCH_NUM, or
    *   PDO::FETCH_BOTH the returned value with be an array of arrays.  For any
    *   other value it will be an array of objects.
    * @return
@@ -1150,7 +1150,7 @@ function db_query($query, $args = array(
     array_shift($args);
   }
   list($query, $args, $options) = _db_query_process_args($query, $args, $options);
-  
+
   return Database::getActiveConnection($options['target'])->query($query, $args, $options);
 }
 
@@ -1184,7 +1184,7 @@ function db_query_range($query, $args, $
     $from = array_pop($args);
   }
   list($query, $args, $options) = _db_query_process_args($query, $args, $options);
-  
+
   return Database::getActiveConnection($options['target'])->queryRange($query, $args, $from, $count, $options);
 }
 
@@ -1214,7 +1214,7 @@ function db_query_temporary($query, $arg
     array_shift($args);
   }
   list($query, $args, $options) = _db_query_process_args($query, $args, $options);
-  
+
   return Database::getActiveConnection($options['target'])->queryTemporary($query, $args, $tablename, $options);
 }
 
@@ -1815,11 +1815,11 @@ function _db_need_install() {
 
 /**
  * Backward-compatibility utility.
- * 
+ *
  * This function should be removed after all queries have been converted
  * to the new API.  It is temporary only.
- * 
- * @todo Remove this once the query conversion is complete. 
+ *
+ * @todo Remove this once the query conversion is complete.
  */
 function _db_query_process_args($query, $args, $options) {
 
@@ -1829,7 +1829,7 @@ function _db_query_process_args($query, 
   if (empty($options['target'])) {
     $options['target'] = 'default';
   }
-  
+
   // Temporary backward-compatibliity hacks.  Remove later.
   $old_query = $query;
   $query = str_replace(array('%n', '%d', '%f', '%b', "'%s'", '%s'), '?', $old_query);
Index: includes/database/query.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/query.inc,v
retrieving revision 1.2
diff -u -p -r1.2 query.inc
--- includes/database/query.inc	22 Aug 2008 12:46:25 -0000	1.2
+++ includes/database/query.inc	25 Aug 2008 17:05:43 -0000
@@ -52,21 +52,21 @@ interface QueryConditionInterface {
    *
    * This method returns by reference.  That allows alter hooks to access the
    * data structure directly and manipulate it before it gets compiled.
-   * 
+   *
    * The data structure that is returned is an indexed array of entries, where
    * each entry looks like the following:
-   * 
+   *
    * array(
    *   'field' => $field,
    *   'value' => $value,
    *   'operator' => $operator,
    * );
-   * 
+   *
    * In the special case that $operator is NULL, the $field is taken as a raw
-   * SQL snippet (possibly containing a function) and $value is an associative 
+   * SQL snippet (possibly containing a function) and $value is an associative
    * array of placeholders for the snippet.
-   * 
-   * There will also be a single array entry of #conjunction, which is the 
+   *
+   * There will also be a single array entry of #conjunction, which is the
    * conjunction that will be applied to the array, such as AND.
    */
   public function &conditions();
@@ -78,7 +78,7 @@ interface QueryConditionInterface {
    *   An associative array of placeholders and values.
    */
   public function arguments();
-  
+
   /**
    * Compiles the saved conditions for later retrieval.
    *
@@ -96,7 +96,7 @@ interface QueryConditionInterface {
  * Interface for a query that can be manipulated via an alter hook.
  */
 interface QueryAlterableInterface {
-  
+
   /**
    * Adds a tag to a query.
    *
@@ -110,7 +110,7 @@ interface QueryAlterableInterface {
    *   The tag to add.
    */
   public function addTag($tag);
-  
+
   /**
    * Determines if a given query has a given tag.
    *
@@ -120,7 +120,7 @@ interface QueryAlterableInterface {
    *   TRUE if this query has been marked with this tag, FALSE otherwise.
    */
   public function hasTag($tag);
-  
+
   /**
    * Determines if a given query has all specified tags.
    *
@@ -141,7 +141,7 @@ interface QueryAlterableInterface {
    *   tags, FALSE otherwise.
    */
   public function hasAnyTag();
-  
+
   /**
    * Adds additional metadata to the query.
    *
@@ -157,7 +157,7 @@ interface QueryAlterableInterface {
    *
    */
   public function addMetaData($key, $object);
-  
+
   /**
    * Retrieves a given piece of metadata.
    *
@@ -264,7 +264,7 @@ class InsertQuery extends Query {
    * Add a set of field->value pairs to be inserted.
    *
    * This method may only be called once.  Calling it a second time will be
-   * ignored.  To queue up multiple sets of values to be inserted at once, 
+   * ignored.  To queue up multiple sets of values to be inserted at once,
    * use the values() method.
    *
    * @param $fields
@@ -327,15 +327,15 @@ class InsertQuery extends Query {
   /**
    * Specify fields for which the database-defaults should be used.
    *
-   * If you want to force a given field to use the database-defined default, 
+   * If you want to force a given field to use the database-defined default,
    * not NULL or undefined, use this method to instruct the database to use
    * default values explicitly.  In most cases this will not be necessary
    * unless you are inserting a row that is all default values, as you cannot
    * specify no values in an INSERT query.
-   * 
+   *
    * Specifying a field both in fields() and in useDefaults() is an error
    * and will not execute.
-   * 
+   *
    * @param $fields
    *   An array of values for which to use the default values
    *   specified in the table definition.
@@ -346,20 +346,20 @@ class InsertQuery extends Query {
     $this->defaultFields = $fields;
     return $this;
   }
-  
+
   /**
    * Flag this query as being delay-safe or not.
    *
    * If this method is never called, it is assumed that the query must be
-   * executed immediately.  If delay is set to TRUE, then the query will be 
+   * executed immediately.  If delay is set to TRUE, then the query will be
    * flagged to run "delayed" or "low priority" on databases that support such
    * capabilities.  In that case, the database will return immediately and the
    * query will be run at some point in the future.  That makes it useful for
    * logging-style queries.
-   * 
+   *
    * If the database does not support delayed INSERT queries, this method
    * has no effect.
-   * 
+   *
    * @param $delay
    *   If TRUE, this query is delay-safe and will run delayed on supported databases.
    * @return
@@ -387,7 +387,7 @@ class InsertQuery extends Query {
     if (array_intersect($this->insertFields, $this->defaultFields)) {
       throw new PDOException('You may not specify the same field to have a value and a schema-default value.');
     }
-    
+
     // Each insert happens in its own query in the degenerate case.  However,
     // we wrap it in a transaction so that it is atomic where possible.  On many
     // databases, such as SQLite, this is also a notable performance boost.
@@ -405,11 +405,11 @@ class InsertQuery extends Query {
   }
 
   public function __toString() {
-    
+
     // Default fields are always placed first for consistency.
     $insert_fields = array_merge($this->defaultFields, $this->insertFields);
-    
-    // For simplicity, we will use the $placeholders array to inject 
+
+    // For simplicity, we will use the $placeholders array to inject
     // default keywords even though they are not, strictly speaking,
     // placeholders for prepared statements.
     $placeholders = array();
@@ -503,10 +503,10 @@ class MergeQuery extends Query {
       $fields = array_combine($fields, $values);
     }
     $this->insertFields = $fields;
- 
+
     return $this;
   }
-  
+
   /**
    * Set the key field(s) to be used to insert or update into the table.
    *
@@ -590,7 +590,7 @@ class MergeQuery extends Query {
       $exclude_fields = func_get_args();
     }
     $this->excludeFields = $exclude_fields;
-    
+
     return $this;
   }
 
@@ -617,7 +617,7 @@ class MergeQuery extends Query {
       'expression' => $expression,
       'arguments' => $arguments,
     );
-    
+
     return $this;
   }
 
@@ -629,25 +629,25 @@ class MergeQuery extends Query {
     // for comprehensibility.  Any practical database driver will override
     // this method with database-specific logic, so this function serves only
     // as a fallback to aid developers of new drivers.
-    
+
     // Wrap multiple queries in a transaction, if the database supports it.
     $transaction = $this->connection->startTransaction();
-    
+
     // Manually check if the record already exists.
     $select = $this->connection->select($this->table);
     foreach ($this->keyFields as $field => $value) {
       $select->condition($field, $value);
     }
-    
+
     $select = $select->countQuery();
     $sql = (string)$select;
     $arguments = $select->getArguments();
     $num_existing = db_query($sql, $arguments)->fetchField();
-    
-    
+
+
     if ($num_existing) {
       // If there is already an existing record, run an update query.
-      
+
       if ($this->updateFields) {
         $update_fields = $this->updateFields;
       }
@@ -672,7 +672,7 @@ class MergeQuery extends Query {
       $insert_fields = $this->insertFields + $this->keyFields;
       $this->connection->insert($this->table, $this->queryOptions)->fields($insert_fields)->execute();
     }
-    
+
     // Commit the transaction.
     $transaction->commit();
   }
@@ -711,7 +711,7 @@ class DeleteQuery extends Query implemen
     $options['return'] = Database::RETURN_AFFECTED;
     parent::__construct($connection, $options);
     $this->table = $table;
-    
+
     $this->condition = new DatabaseCondition('AND');
   }
 
@@ -735,7 +735,7 @@ class DeleteQuery extends Query implemen
     $this->condition->where($snippet, $args);
     return $this;
   }
-  
+
   public function compile(DatabaseConnection $connection) {
     return $this->condition->compile($connection);
   }
@@ -816,7 +816,7 @@ class UpdateQuery extends Query implemen
     $options['return'] = Database::RETURN_AFFECTED;
     parent::__construct($connection, $options);
     $this->table = $table;
-    
+
     $this->condition = new DatabaseCondition('AND');
   }
 
@@ -840,7 +840,7 @@ class UpdateQuery extends Query implemen
     $this->condition->where($snippet, $args);
     return $this;
   }
-  
+
   public function compile(DatabaseConnection $connection) {
     return $this->condition->compile($connection);
   }
@@ -881,12 +881,12 @@ class UpdateQuery extends Query implemen
       'expression' => $expression,
       'arguments' => $arguments,
     );
-    
+
     return $this;
   }
 
   public function execute() {
-    
+
     // Expressions take priority over literal fields, so we process those first
     // and remove any literal fields that conflict.
     $fields = $this->fields;
@@ -897,14 +897,14 @@ class UpdateQuery extends Query implemen
       }
       unset($fields[$field]);
     }
-    
+
     // Because we filter $fields the same way here and in __toString(), the
     // placeholders will all match up properly.
     $max_placeholder = 0;
     foreach ($fields as $field => $value) {
       $update_values[':db_update_placeholder_' . ($max_placeholder++)] = $value;
     }
-    
+
     if (count($this->condition)) {
       $this->condition->compile($this->connection);
       $update_values = array_merge($update_values, $this->condition->arguments());
@@ -922,7 +922,7 @@ class UpdateQuery extends Query implemen
       $update_fields[] = $field . '=' . $data['expression'];
       unset($fields[$field]);
     }
-    
+
     $max_placeholder = 0;
     foreach ($fields as $field => $value) {
       $update_fields[] = $field . '=:db_update_placeholder_' . ($max_placeholder++);
@@ -948,13 +948,13 @@ class DatabaseCondition implements Query
 
   protected $conditions = array();
   protected $arguments = array();
-  
+
   protected $changed = TRUE;
 
   public function __construct($conjunction) {
     $this->conditions['#conjunction'] = $conjunction;
   }
-  
+
   /**
    * Return the size of this conditional.  This is part of the Countable interface.
    *
@@ -964,16 +964,16 @@ class DatabaseCondition implements Query
   public function count() {
     return count($this->conditions) - 1;
   }
-  
+
   public function condition($field, $value = NULL, $operator = '=') {
     $this->conditions[] = array(
       'field' => $field,
       'value' => $value,
       'operator' => $operator,
     );
-    
+
     $this->changed = TRUE;
-    
+
     return $this;
   }
 
@@ -984,10 +984,10 @@ class DatabaseCondition implements Query
       'operator' => NULL,
     );
     $this->changed = TRUE;
-    
+
     return $this;
   }
-  
+
   public function &conditions() {
     return $this->conditions;
   }
@@ -1008,10 +1008,10 @@ class DatabaseCondition implements Query
     static $next_placeholder = 1;
 
     if ($this->changed) {
-    
+
       $condition_fragments = array();
       $arguments = array();
-      
+
       $conditions = $this->conditions;
       $conjunction = $conditions['#conjunction'];
       unset($conditions['#conjunction']);
@@ -1043,7 +1043,7 @@ class DatabaseCondition implements Query
               $operator = $this->mapConditionOperator($condition['operator']);
             }
             $operator += $operator_defaults;
-            
+
             if ($condition['value'] instanceof SelectQuery) {
               $placeholders[] = (string)$condition['value'];
               $arguments += $condition['value']->arguments();
@@ -1061,17 +1061,17 @@ class DatabaseCondition implements Query
               $placeholders[] = $placeholder;
             }
             $condition_fragments[] = ' (' . $condition['field'] . ' ' . $operator['operator'] . ' ' . $operator['prefix'] . implode($operator['delimiter'], $placeholders) . $operator['postfix'] . ') ';
-            
+
           }
         }
       }
-      
+
       $this->changed = FALSE;
       $this->stringVersion = implode($conjunction, $condition_fragments);
       $this->arguments = $arguments;
     }
   }
-  
+
   public function __toString() {
     // If the caller forgot to call compile() first, refuse to run.
     if ($this->changed) {
@@ -1079,7 +1079,7 @@ class DatabaseCondition implements Query
     }
     return $this->stringVersion;
   }
-  
+
   /**
    * Gets any special processing requirements for the condition operator.
    *
@@ -1105,7 +1105,7 @@ class DatabaseCondition implements Query
 
     return $return;
   }
-  
+
 }
 
 /**
Index: includes/database/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/schema.inc,v
retrieving revision 1.1
diff -u -p -r1.1 schema.inc
--- includes/database/schema.inc	21 Aug 2008 19:36:36 -0000	1.1
+++ includes/database/schema.inc	25 Aug 2008 17:05:43 -0000
@@ -117,29 +117,29 @@
  */
 
 abstract class DatabaseSchema {
-  
+
   protected $connection;
-  
+
   public function __construct($connection) {
     $this->connection = $connection;
   }
-  
+
   /**
    * Check if a table exists.
    */
   abstract public function tableExists($table);
-  
+
   /**
    * Check if a column exists in the given table.
    */
   abstract public function columnExists($table, $column);
-  
+
   /**
    * This maps a generic data type in combination with its data size
    * to the engine-specific data type.
    */
   abstract public function getFieldTypeMap();
-  
+
   /**
    * Rename a table.
    *
@@ -161,7 +161,7 @@ abstract class DatabaseSchema {
    *   The table to be dropped.
    */
   abstract public function dropTable(&$ret, $table);
-  
+
   /**
    * Add a new field to a table.
    *
@@ -380,7 +380,7 @@ abstract class DatabaseSchema {
       $ret[] = update_sql($statement);
     }
   }
-  
+
   /**
    * Return an array of field names from an array of key/index column specifiers.
    *
Index: includes/database/select.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/select.inc,v
retrieving revision 1.2
diff -u -p -r1.2 select.inc
--- includes/database/select.inc	22 Aug 2008 12:46:25 -0000	1.2
+++ includes/database/select.inc	25 Aug 2008 17:05:43 -0000
@@ -95,33 +95,33 @@ class SelectQuery extends Query implemen
     $this->having = new DatabaseCondition('AND');
     $this->addJoin(NULL, $table, $alias);
   }
-  
+
   /* Implementations of QueryAlterableInterface. */
-  
+
   public function addTag($tag) {
     $this->alterTags[$tag] = 1;
   }
-  
+
   public function hasTag($tag) {
     return isset($this->alterTags[$tag]);
   }
-  
+
   public function hasAllTags() {
     return !(boolean)array_diff(func_get_args(), array_keys($this->alterTags));
   }
-  
+
   public function hasAnyTag() {
     return (boolean)array_intersect(func_get_args(), array_keys($this->alterTags));
   }
-  
+
   public function addMetaData($key, $object) {
     $this->alterMetaData[$key] = $object;
   }
-  
+
   public function getMetaData($key) {
     return isset($this->alterMetaData[$key]) ? $this->alterMetaData[$key] : NULL;
   }
-  
+
   /* Implementations of QueryConditionInterface for the WHERE clause. */
 
   public function condition($field, $value = NULL, $operator = '=') {
@@ -144,7 +144,7 @@ class SelectQuery extends Query implemen
     $this->where->where($snippet, $args);
     return $this;
   }
-  
+
   public function compile(DatabaseConnection $connection) {
     return $this->where->compile($connection);
   }
@@ -171,13 +171,13 @@ class SelectQuery extends Query implemen
     $this->having->where($snippet, $args);
     return $this;
   }
-  
+
   public function havingCompile(DatabaseConnection $connection) {
     return $this->having->compile($connection);
   }
 
   /* Alter accessors to expose the query data to alter hooks. */
-  
+
   /**
    * Returns a reference to the fields array for this query.
    *
@@ -186,7 +186,7 @@ class SelectQuery extends Query implemen
    * use of addField() is preferred.
    *
    * Note that this method must be called by reference as well:
-   * 
+   *
    * @code
    * $fields =& $query->getFields();
    * @endcode
@@ -197,7 +197,7 @@ class SelectQuery extends Query implemen
   public function &getFields() {
     return $this->fields;
   }
-  
+
   /**
    * Returns a reference to the expressions array for this query.
    *
@@ -206,18 +206,18 @@ class SelectQuery extends Query implemen
    * use of addExpression() is preferred.
    *
    * Note that this method must be called by reference as well:
-   * 
+   *
    * @code
    * $fields =& $query->getExpressions();
    * @endcode
-   * 
+   *
    * @return
    *   A reference to the expression array structure.
    */
   public function &getExpressions() {
     return $this->expressions;
   }
-  
+
   /**
    * Returns a reference to the order by array for this query.
    *
@@ -226,18 +226,18 @@ class SelectQuery extends Query implemen
    * fields, however, the use of orderBy() is preferred.
    *
    * Note that this method must be called by reference as well:
-   * 
+   *
    * @code
    * $fields =& $query->getOrderBy();
    * @endcode
-   * 
+   *
    * @return
    *   A reference to the expression array structure.
    */
   public function &getOrderBy() {
     return $this->order;
   }
-  
+
   /**
    * Returns a reference to the tables array for this query.
    *
@@ -246,11 +246,11 @@ class SelectQuery extends Query implemen
    * use of the join() methods is preferred.
    *
    * Note that this method must be called by reference as well:
-   * 
+   *
    * @code
    * $fields =& $query->getTables();
    * @endcode
-   * 
+   *
    * @return
    *   A reference to the tables array structure.
    */
@@ -277,13 +277,13 @@ class SelectQuery extends Query implemen
         $args += $expression['arguments'];
       }
     }
-    
+
     return $args;
   }
-  
+
   public function execute() {
     drupal_alter('query', $this);
-    
+
     $this->where->compile($this->connection);
     $this->having->compile($this->connection);
     $args = $this->where->arguments() + $this->having->arguments();
@@ -297,7 +297,7 @@ class SelectQuery extends Query implemen
         $args += $expression['arguments'];
       }
     }
-    
+
     if (!empty($this->range)) {
       return $this->connection->queryRange((string)$this, $args, $this->range['start'], $this->range['length'], $this->queryOptions);
     }
@@ -376,15 +376,15 @@ class SelectQuery extends Query implemen
    */
   public function addExpression($expression, $alias = NULL, $arguments = array()) {
     static $alaises = array();
-    
+
     if (empty($alias)) {
       $alias = 'expression';
     }
-    
+
     if (empty($aliases[$alias])) {
       $aliases[$alias] = 1;
     }
-    
+
     if (!empty($this->expressions[$alias])) {
       $alias = $alias . '_' . $aliases[$alias]++;
     }
@@ -588,7 +588,7 @@ class SelectQuery extends Query implemen
   public function groupBy($field) {
     $this->group[] = $field;
   }
-  
+
   /**
    * Get the equivalent COUNT query of this query as a new query object.
    *
@@ -599,24 +599,24 @@ class SelectQuery extends Query implemen
     // Shallow-clone this query.  We don't want to duplicate any of the
     // referenced objects, so a shallow query is all we need.
     $count = clone($this);
-    
+
     // Zero-out existing fields and expressions.
     $fields =& $count->getFields();
     $fields = array();
     $expressions =& $count->getExpressions();
     $expressions = array();
-    
+
     // Ordering a count query is a waste of cycles, and breaks on some
     // databases anyway.
     $orders = &$count->getOrderBy();
     $orders = array();
-    
+
     // COUNT() is an expression, so we add that back in.
     $count->addExpression('COUNT(*)');
-    
+
     return $count;
   }
-  
+
   public function __toString() {
 
     // SELECT
@@ -679,12 +679,12 @@ class SelectQuery extends Query implemen
 
     return $query;
   }
-  
+
   public function __clone() {
     // On cloning, also clone the conditional objects.  However, we do not
     // want to clone the database connection object as that would duplicate the
     // connection itself.
-    
+
     $this->where = clone($this->where);
     $this->having = clone($this->having);
   }
Index: includes/database/mysql/query.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/mysql/query.inc,v
retrieving revision 1.1
diff -u -p -r1.1 query.inc
--- includes/database/mysql/query.inc	21 Aug 2008 19:36:36 -0000	1.1
+++ includes/database/mysql/query.inc	25 Aug 2008 17:05:43 -0000
@@ -9,13 +9,13 @@
 class InsertQuery_mysql extends InsertQuery {
 
   public function execute() {
-    
+
     // Confirm that the user did not try to specify an identical
     //  field and default field.
     if (array_intersect($this->insertFields, $this->defaultFields)) {
       throw new PDOException('You may not specify the same field to have a value and a schema-default value.');
     }
-    
+
     $last_insert_id = 0;
 
     $max_placeholder = 0;
@@ -37,10 +37,10 @@ class InsertQuery_mysql extends InsertQu
   public function __toString() {
 
     $delay = $this->queryOptions['delay'] ? 'DELAYED' : '';
-    
+
     // Default fields are always placed first for consistency.
     $insert_fields = array_merge($this->defaultFields, $this->insertFields);
-    
+
     $query = "INSERT $delay INTO {" . $this->table . '} (' . implode(', ', $insert_fields) . ') VALUES ';
 
     $max_placeholder = 0;
@@ -48,11 +48,11 @@ class InsertQuery_mysql extends InsertQu
     if (count($this->insertValues)) {
       foreach ($this->insertValues as $insert_values) {
         $placeholders = array();
-        
+
         // Default fields aren't really placeholders, but this is the most convenient
         // way to handle them.
         $placeholders = array_pad($placeholders, count($this->defaultFields), 'default');
-        
+
         $new_placeholder = $max_placeholder + count($insert_values);
         for ($i = $max_placeholder; $i < $new_placeholder; ++$i) {
           $placeholders[] = ':db_insert_placeholder_'. $i;
@@ -87,7 +87,7 @@ class MergeQuery_mysql extends MergeQuer
         unset($update_fields[$exclude_field]);
       }
     }
-    
+
     $insert_fields = $this->insertFields + $this->keyFields;
 
     $max_placeholder = 0;
@@ -106,7 +106,7 @@ class MergeQuery_mysql extends MergeQuer
       }
       unset($update_fields[$field]);
     }
-    
+
     // Because we filter $fields the same way here and in __toString(), the
     // placeholders will all match up properly.
     $max_placeholder = 0;
@@ -119,7 +119,7 @@ class MergeQuery_mysql extends MergeQuer
     return $last_insert_id;
   }
 
-  
+
   public function __toString() {
 
     // Set defaults.
@@ -134,7 +134,7 @@ class MergeQuery_mysql extends MergeQuer
         unset($update_fields[$exclude_field]);
       }
     }
-    
+
     $insert_fields = $this->insertFields + $this->keyFields;
 
     $query = "INSERT INTO {" . $this->table . '} (' . implode(', ', array_keys($insert_fields)) . ') VALUES ';
@@ -147,7 +147,7 @@ class MergeQuery_mysql extends MergeQuer
     }
 
     $query .= '(' . implode(', ', $values) . ') ON DUPLICATE KEY UPDATE ';
-    
+
     // Expressions take priority over literal fields, so we process those first
     // and remove any literal fields that conflict.
     $max_placeholder = 0;
@@ -160,7 +160,7 @@ class MergeQuery_mysql extends MergeQuer
     foreach ($update_fields as $field => $value) {
       $update[] = ($field . '=:db_update_placeholder_' . $max_placeholder++);
     }
-    
+
     $query .= implode(', ', $update);
 
     return $query;
Index: includes/database/mysql/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/mysql/schema.inc,v
retrieving revision 1.1
diff -u -p -r1.1 schema.inc
--- includes/database/mysql/schema.inc	21 Aug 2008 19:36:36 -0000	1.1
+++ includes/database/mysql/schema.inc	25 Aug 2008 17:05:43 -0000
@@ -17,7 +17,7 @@ class DatabaseSchema_mysql extends Datab
   public function tableExists($table) {
     return (bool) $this->connection->query("SHOW TABLES LIKE '{" . $table . "}'", array(), array())->fetchField();
   }
-  
+
   public function columnExists($table, $column) {
     return (bool) $this->connection->query("SHOW COLUMNS FROM {" . $this->escapeTable($table) . "} LIKE '" . $this->escapeTable($column) . "'", array(), array())->fetchField();
   }
@@ -37,25 +37,25 @@ class DatabaseSchema_mysql extends Datab
     if (empty($table['mysql_suffix'])) {
       $table['mysql_suffix'] = "/*!40100 DEFAULT CHARACTER SET UTF8 */";
     }
-  
+
     $sql = "CREATE TABLE {" . $name . "} (\n";
-  
+
     // Add the SQL statement for each field.
     foreach ($table['fields'] as $field_name => $field) {
       $sql .= $this->createFieldSql($field_name, $this->processField($field)) . ", \n";
     }
-  
+
     // Process keys & indexes.
     $keys = $this->createKeysSql($table);
     if (count($keys)) {
       $sql .= implode(", \n", $keys) . ", \n";
     }
-  
+
     // Remove the last comma and space.
     $sql = substr($sql, 0, -3) . "\n) ";
-  
+
     $sql .= $table['mysql_suffix'];
-  
+
     return array($sql);
   }
 
@@ -72,40 +72,40 @@ class DatabaseSchema_mysql extends Datab
    */
   protected function createFieldSql($name, $spec) {
     $sql = "`" . $name . "` " . $spec['mysql_type'];
-  
+
     if (isset($spec['length'])) {
       $sql .= '(' . $spec['length'] . ')';
     }
     elseif (isset($spec['precision']) && isset($spec['scale'])) {
       $sql .= '(' . $spec['precision'] . ', ' . $spec['scale'] . ')';
     }
-  
+
     if (!empty($spec['unsigned'])) {
       $sql .= ' unsigned';
     }
-  
+
     if (!empty($spec['not null'])) {
       $sql .= ' NOT NULL';
     }
-  
+
     if (!empty($spec['auto_increment'])) {
       $sql .= ' auto_increment';
     }
-  
+
     if (isset($spec['default'])) {
       if (is_string($spec['default'])) {
         $spec['default'] = "'" . $spec['default'] . "'";
       }
       $sql .= ' DEFAULT ' . $spec['default'];
     }
-  
+
     if (empty($spec['not null']) && !isset($spec['default'])) {
       $sql .= ' DEFAULT NULL';
     }
-  
+
     return $sql;
   }
-  
+
   /**
    * Set database-engine specific properties for a field.
    *
@@ -113,21 +113,21 @@ class DatabaseSchema_mysql extends Datab
    *   A field description array, as specified in the schema documentation.
    */
   protected function processField($field) {
-  
+
     if (!isset($field['size'])) {
       $field['size'] = 'normal';
     }
-  
+
     // Set the correct database-engine specific datatype.
     if (!isset($field['mysql_type'])) {
       $map = db_type_map();
       $field['mysql_type'] = $map[$field['type'] . ':' . $field['size']];
     }
-  
+
     if ($field['type'] == 'serial') {
       $field['auto_increment'] = TRUE;
     }
-  
+
     return $field;
   }
 
@@ -138,41 +138,41 @@ class DatabaseSchema_mysql extends Datab
     static $map = array(
       'varchar:normal'  => 'VARCHAR',
       'char:normal'     => 'CHAR',
-  
+
       'text:tiny'       => 'TINYTEXT',
       'text:small'      => 'TINYTEXT',
       'text:medium'     => 'MEDIUMTEXT',
       'text:big'        => 'LONGTEXT',
       'text:normal'     => 'TEXT',
-  
+
       'serial:tiny'     => 'TINYINT',
       'serial:small'    => 'SMALLINT',
       'serial:medium'   => 'MEDIUMINT',
       'serial:big'      => 'BIGINT',
       'serial:normal'   => 'INT',
-  
+
       'int:tiny'        => 'TINYINT',
       'int:small'       => 'SMALLINT',
       'int:medium'      => 'MEDIUMINT',
       'int:big'         => 'BIGINT',
       'int:normal'      => 'INT',
-  
+
       'float:tiny'      => 'FLOAT',
       'float:small'     => 'FLOAT',
       'float:medium'    => 'FLOAT',
       'float:big'       => 'DOUBLE',
       'float:normal'    => 'FLOAT',
-  
+
       'numeric:normal'  => 'DECIMAL',
-  
+
       'blob:big'        => 'LONGBLOB',
       'blob:normal'     => 'BLOB',
-  
+
       'datetime:normal' => 'DATETIME',
     );
     return $map;
   }
-  
+
 
 
 
@@ -195,7 +195,7 @@ class DatabaseSchema_mysql extends Datab
 
     return $keys;
   }
-  
+
   protected function createKeySql($fields) {
     $ret = array();
     foreach ($fields as $field) {
@@ -225,7 +225,7 @@ class DatabaseSchema_mysql extends Datab
   public function renameTable(&$ret, $table, $new_name) {
     $ret[] = update_sql('ALTER TABLE {' . $table . '} RENAME TO {' . $new_name . '}');
   }
-  
+
   public function dropTable(&$ret, $table) {
     $ret[] = update_sql('DROP TABLE {' . $table . '}');
   }
@@ -265,7 +265,7 @@ class DatabaseSchema_mysql extends Datab
     else {
       $default = is_string($default) ? "'$default'" : $default;
     }
-  
+
     $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $field . ' SET DEFAULT ' . $default);
   }
 
@@ -276,7 +276,7 @@ class DatabaseSchema_mysql extends Datab
   public function addPrimaryKey(&$ret, $table, $fields) {
     $ret[] = update_sql('ALTER TABLE {' . $table . '} ADD PRIMARY KEY (' . $this->createKeySql($fields) . ')');
   }
-  
+
   public function dropPrimaryKey(&$ret, $table) {
     $ret[] = update_sql('ALTER TABLE {' . $table . '} DROP PRIMARY KEY');
   }
@@ -288,7 +288,7 @@ class DatabaseSchema_mysql extends Datab
   public function dropUniqueKey(&$ret, $table, $name) {
     $ret[] = update_sql('ALTER TABLE {' . $table . '} DROP KEY ' . $name);
   }
-  
+
   public function addIndex(&$ret, $table, $name, $fields) {
     $query = 'ALTER TABLE {' . $table . '} ADD INDEX ' . $name . ' (' . $this->createKeySql($fields) . ')';
     $ret[] = update_sql($query);
@@ -297,7 +297,7 @@ class DatabaseSchema_mysql extends Datab
   public function dropIndex(&$ret, $table, $name) {
     $ret[] = update_sql('ALTER TABLE {' . $table . '} DROP INDEX ' . $name);
   }
-  
+
   public function changeField(&$ret, $table, $field, $field_new, $spec, $keys_new = array()) {
     $sql = 'ALTER TABLE {' . $table . '} CHANGE ' . $field . ' ' . $this->createFieldSql($field_new, $this->processField($spec));
     if (count($keys_new)) {
Index: includes/database/pgsql/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/pgsql/database.inc,v
retrieving revision 1.2
diff -u -p -r1.2 database.inc
--- includes/database/pgsql/database.inc	22 Aug 2008 12:46:25 -0000	1.2
+++ includes/database/pgsql/database.inc	25 Aug 2008 17:05:43 -0000
@@ -33,7 +33,7 @@ class DatabaseConnection_pgsql extends D
   public function query($query, Array $args = array(), $options = array()) {
 
     $options += $this->defaultOptions();
-    
+
     try {
       if ($query instanceof DatabaseStatement) {
         $stmt = $query;
@@ -43,7 +43,7 @@ class DatabaseConnection_pgsql extends D
         $stmt = $this->prepareQuery($query);
         $stmt->execute($args, $options);
       }
-      
+
       switch ($options['return']) {
         case Database::RETURN_STATEMENT:
           return $stmt;
@@ -74,7 +74,7 @@ class DatabaseConnection_pgsql extends D
       return NULL;
     }
   }
-  
+
   public function queryRange($query, Array $args, $from, $count, Array $options) {
     // Backward compatibility hack, temporary.
     $query = str_replace(array('%d' , '%f' , '%b' , "'%s'"), '?', $query);
Index: includes/database/pgsql/query.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/pgsql/query.inc,v
retrieving revision 1.1
diff -u -p -r1.1 query.inc
--- includes/database/pgsql/query.inc	21 Aug 2008 19:36:36 -0000	1.1
+++ includes/database/pgsql/query.inc	25 Aug 2008 17:05:43 -0000
@@ -13,9 +13,9 @@ class InsertQuery_pgsql extends InsertQu
     parent::__construct($connection, $table, $options);
     $this->queryOptions['return'] = Database::RETURN_NULL;
   }
-  
+
   public function execute() {
-    
+
     // Confirm that the user did not try to specify an identical
     //  field and default field.
     if (array_intersect($this->insertFields, $this->defaultFields)) {
@@ -53,13 +53,13 @@ class InsertQuery_pgsql extends InsertQu
     // when requesting the last insert ID, so we pass that in via
     // the options array.
     $options = $this->queryOptions;
-    
+
     if ($schema['fields'][$schema['primary key'][0]]['type'] == 'serial') {
       $options['sequence_name'] = $this->connection->makeSequenceName($this->table, $schema['primary key'][0]);
       $options['return'] = Database::RETURN_INSERT_ID;
     }
     $last_insert_id = $this->connection->query($stmt, array(), $options);
-    
+
     // Re-initialize the values array so that we can re-use this query.
     $this->insertValues = array();
 
@@ -67,7 +67,7 @@ class InsertQuery_pgsql extends InsertQu
   }
 
   public function __toString() {
-    
+
     // Default fields are always placed first for consistency.
     $insert_fields = array_merge($this->defaultFields, $this->insertFields);
 
@@ -78,11 +78,11 @@ class InsertQuery_pgsql extends InsertQu
       if (count($this->insertValues)) {
       foreach ($this->insertValues as $insert_values) {
         $placeholders = array();
-        
+
         // Default fields aren't really placeholders, but this is the most convenient
         // way to handle them.
         $placeholders = array_pad($placeholders, count($this->defaultFields), 'default');
-        
+
         $new_placeholder = $max_placeholder + count($insert_values);
         for ($i = $max_placeholder; $i < $new_placeholder; ++$i) {
           $placeholders[] = ':db_insert_placeholder_' . $i;
@@ -103,18 +103,18 @@ class InsertQuery_pgsql extends InsertQu
   }
 }
 
-class UpdateQuery_pgsql extends UpdateQuery { 
+class UpdateQuery_pgsql extends UpdateQuery {
   public function execute() {
     $max_placeholder = 0;
     $blobs = array();
     $blob_count = 0;
-    
+
     $schema = drupal_get_schema($this->table);
-    
+
     // Because we filter $fields the same way here and in __toString(), the
     // placeholders will all match up properly.
     $stmt = $this->connection->prepareQuery((string)$this);
-    
+
     // Expressions take priority over literal fields, so we process those first
     // and remove any literal fields that conflict.
     $fields = $this->fields;
@@ -130,7 +130,7 @@ class UpdateQuery_pgsql extends UpdateQu
       }
       unset($fields[$field]);
     }
-    
+
     foreach ($fields as $field => &$value) {
       $placeholder = ':db_update_placeholder_' . ($max_placeholder++);
 
@@ -160,7 +160,7 @@ class UpdateQuery_pgsql extends UpdateQu
     $options = $this->queryOptions;
     $options['already_prepared'] = TRUE;
     $this->connection->query($stmt, $options);
-    
+
     //$stmt->execute(NULL, $this->queryOptions);
     return $stmt->rowCount();
   }
Index: includes/database/pgsql/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/pgsql/schema.inc,v
retrieving revision 1.1
diff -u -p -r1.1 schema.inc
--- includes/database/pgsql/schema.inc	21 Aug 2008 19:36:36 -0000	1.1
+++ includes/database/pgsql/schema.inc	25 Aug 2008 17:05:43 -0000
@@ -16,7 +16,7 @@ class DatabaseSchema_pgsql extends Datab
   public function tableExists($table) {
     return (bool) db_result(db_query("SELECT COUNT(*) FROM pg_class WHERE relname = '{" . db_escape_table($table) . "}'"));
   }
-  
+
   public function columnExists($table, $column) {
     return (bool) db_result(db_query("SELECT COUNT(pg_attribute.attname) FROM pg_class, pg_attribute WHERE pg_attribute.attrelid = pg_class.oid AND pg_class.relname = '{" . db_escape_table($table) . "}' AND attname = '" . db_escape_table($column) . "'"));
   }
Index: modules/contact/contact.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.test,v
retrieving revision 1.8
diff -u -p -r1.8 contact.test
--- modules/contact/contact.test	2 Aug 2008 05:16:47 -0000	1.8
+++ modules/contact/contact.test	25 Aug 2008 17:05:45 -0000
@@ -60,7 +60,7 @@ class ContactSitewideTestCase extends Dr
     $recipients = array('simpletest@example.com', 'simpletest2@example.com', 'simpletest3@example.com');
     $this->addCategory($category = $this->randomName(16), implode(',', array($recipients[0])), '', TRUE);
     $this->assertRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.'));
-    
+
     // Test update contact form category
     $categories = $this->getCategories();
     $category_id = $this->updateCategory($categories, $category = $this->randomName(16), $recipients_str = implode(',', array($recipients[0], $recipients[1])), $reply = $this->randomName(30), FALSE);
@@ -70,7 +70,7 @@ class ContactSitewideTestCase extends Dr
     $this->assertEqual($category_array['reply'], $reply);
     $this->assertFalse($category_array['selected']);
     $this->assertRaw(t('Category %category has been updated.', array('%category' => $category)), t('Category successfully updated.'));
-		
+
     $this->addCategory($category = $this->randomName(16), implode(',', array($recipients[0], $recipients[1])), '', FALSE);
     $this->assertRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.'));
 
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.167
diff -u -p -r1.167 menu.module
--- modules/menu/menu.module	21 Aug 2008 19:36:37 -0000	1.167
+++ modules/menu/menu.module	25 Aug 2008 17:05:46 -0000
@@ -315,13 +315,13 @@ function menu_nodeapi(&$node, $op) {
         if (isset($node->nid)) {
           // Give priority to the default menu
           $mlid = db_result(db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = :path AND menu_name = :menu_name AND module = 'menu' ORDER BY mlid ASC", array(
-            ':path' => 'node/'. $node->nid, 
+            ':path' => 'node/'. $node->nid,
             ':menu_name' => $menu_name,
           ), 0, 1));
           // Check all menus if a link does not exist in the default menu.
           if (!$mlid) {
             $mlid = db_result(db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu' ORDER BY mlid ASC", array(
-              ':path' => 'node/'. $node->nid, 
+              ':path' => 'node/'. $node->nid,
             ), 0, 1));
           }
           if ($mlid) {
Index: modules/profile/profile.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v
retrieving revision 1.3
diff -u -p -r1.3 profile.pages.inc
--- modules/profile/profile.pages.inc	21 Aug 2008 19:36:38 -0000	1.3
+++ modules/profile/profile.pages.inc	25 Aug 2008 17:05:47 -0000
@@ -111,7 +111,7 @@ function profile_autocomplete($field, $s
   $matches = array();
   if (db_result(db_query("SELECT COUNT(*) FROM {profile_fields} WHERE fid = %d AND autocomplete = 1", $field))) {
     $result = db_query_range("SELECT value FROM {profile_values} WHERE fid = :fid AND LOWER(value) LIKE LOWER(:value) GROUP BY value ORDER BY value ASC", array(
-      ':fid' => $field, 
+      ':fid' => $field,
       ':value' => $string .'%',
     ), 0, 10);
     while ($data = db_fetch_object($result)) {
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.263
diff -u -p -r1.263 search.module
--- modules/search/search.module	21 Aug 2008 19:36:38 -0000	1.263
+++ modules/search/search.module	25 Aug 2008 17:05:47 -0000
@@ -570,8 +570,8 @@ function search_index($sid, $type, $text
 
   // Insert results into search index
   foreach ($results[0] as $word => $score) {
-    // If a word already exists in the database, its score gets increased 
-    // appropriately.  If not, we create a new record with the appropriate 
+    // If a word already exists in the database, its score gets increased
+    // appropriately.  If not, we create a new record with the appropriate
     // starting score.
     db_merge('search_index')->key(array(
       'word' => $word,
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.34
diff -u -p -r1.34 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	23 Aug 2008 07:42:54 -0000	1.34
+++ modules/simpletest/drupal_web_test_case.php	25 Aug 2008 17:05:47 -0000
@@ -72,12 +72,12 @@ class DrupalWebTestCase {
     $db_prefix = $this->db_prefix_original;
     db_insert('simpletest')->fields(array(
       'test_id' => $this->test_id,
-    'test_class' => get_class($this), 
-    'status' => $status, 
+    'test_class' => get_class($this),
+    'status' => $status,
     'message' => substr($message, 0, 255),  // Some messages are too long for the database.
-    'message_group' => $group, 
-    'caller' => $function['function'], 
-    'line' => $function['line'], 
+    'message_group' => $group,
+    'caller' => $function['function'],
+    'line' => $function['line'],
     'file' => $function['file'],
     ))->execute();
     $this->_assertions[] = array(
@@ -405,7 +405,7 @@ class DrupalWebTestCase {
     node_types_rebuild();
 
     $this->assertEqual($saved_type, SAVED_NEW, t('Created content type %type.', array('%type' => $type->type)));
-    
+
     // Reset permissions so that permissions for this content type are available.
     $this->checkPermissions(array(), TRUE);
 
@@ -645,7 +645,7 @@ class DrupalWebTestCase {
 
     // Generate temporary prefixed database to ensure that tests have a clean starting point.
     $db_prefix = 'simpletest' . mt_rand(1000, 1000000);
-    
+
     include_once './includes/install.inc';
     drupal_install_system();
 
@@ -659,7 +659,7 @@ class DrupalWebTestCase {
     // stale data for the previous run's database prefix and all
     // calls to it will fail.
     drupal_get_schema(NULL, TRUE);
-    
+
     // Run default profile tasks.
     $task = 'profile';
     default_profile_tasks($task, '');
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.280
diff -u -p -r1.280 statistics.module
--- modules/statistics/statistics.module	21 Aug 2008 19:36:38 -0000	1.280
+++ modules/statistics/statistics.module	25 Aug 2008 17:05:48 -0000
@@ -68,12 +68,12 @@ function statistics_exit() {
     // Log this page access.
     db_insert('accesslog')->fields(array(
       'title' => strip_tags(drupal_get_title()),
-      'path' => $_GET['q'], 
-      'url' => referer_uri(), 
-      'hostname' => ip_address(), 
-      'uid' => $user->uid, 
-      'sid' => session_id(), 
-      'timer' => timer_read('page'), 
+      'path' => $_GET['q'],
+      'url' => referer_uri(),
+      'hostname' => ip_address(),
+      'uid' => $user->uid,
+      'sid' => session_id(),
+      'timer' => timer_read('page'),
       'timestamp' => time(),
     ))->execute();
   }
Index: modules/taxonomy/taxonomy.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.pages.inc,v
retrieving revision 1.12
diff -u -p -r1.12 taxonomy.pages.inc
--- modules/taxonomy/taxonomy.pages.inc	21 Aug 2008 19:36:38 -0000	1.12
+++ modules/taxonomy/taxonomy.pages.inc	25 Aug 2008 17:05:49 -0000
@@ -120,7 +120,7 @@ function taxonomy_autocomplete($vid, $st
   $matches = array();
   if ($last_string != '') {
     $result = db_query_range(db_rewrite_sql("SELECT t.tid, t.name FROM {term_data} t WHERE t.vid = :vid AND LOWER(t.name) LIKE LOWER(:last_string)", 't', 'tid'), array(
-      ':vid' => $vid, 
+      ':vid' => $vid,
       ':last_string' => '%'. $last_string .'%',
     ), 0, 10);
 
Index: profiles/default/default.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v
retrieving revision 1.27
diff -u -p -r1.27 default.profile
--- profiles/default/default.profile	21 Aug 2008 19:36:39 -0000	1.27
+++ profiles/default/default.profile	25 Aug 2008 17:05:50 -0000
@@ -136,7 +136,7 @@ function default_profile_tasks(&$task, $
   // Create a default vocabulary named "Tags", enabled for the 'article' content type.
   $description = st('Use tags to group articles on similar topics into categories.');
   $help = st('Enter a comma-separated list of words.');
-  
+
   $vid = db_insert('vocabulary')->fields(array(
     'name' => 'Tags',
     'description' => $description,
@@ -150,7 +150,7 @@ function default_profile_tasks(&$task, $
     'weight' => 0,
   ))->execute();
   db_insert('vocabulary_node_types')->fields(array('vid' => $vid, 'type' => 'article'))->execute();
-  
+
   // Update the menu router information.
   menu_rebuild();
 }
Index: scripts/run-tests.sh
===================================================================
RCS file: /cvs/drupal/drupal/scripts/run-tests.sh,v
retrieving revision 1.7
diff -u -p -r1.7 run-tests.sh
--- scripts/run-tests.sh	18 Aug 2008 18:52:31 -0000	1.7
+++ scripts/run-tests.sh	25 Aug 2008 17:05:51 -0000
@@ -115,13 +115,13 @@ All arguments are long options.
   --concurrency [num]
 
               Run tests in parallel, up to [num] tests at a time. This requires
-              the Process Control Extension (PCNTL) to be compiled in PHP, not 
+              the Process Control Extension (PCNTL) to be compiled in PHP, not
               supported under Windows.
 
   --all       Run all available tests.
 
   --class     Run tests identified by specific class names, instead of group names.
-  
+
   --file      Run tests identifiled by specific file names, instead of group names.
               Specify the path and the extension (i.e. 'modules/user/user.test').
 
@@ -370,7 +370,7 @@ function simpletest_script_get_test_list
       foreach ($args['test_names'] as $file) {
         $files[realpath($file)] = 1;
       }
-	  
+
       // Check for valid class names.
       foreach ($all_tests as $class_name => $instance) {
         $refclass = new ReflectionClass($class_name);
Index: sites/default/default.settings.php
===================================================================
RCS file: /cvs/drupal/drupal/sites/default/default.settings.php,v
retrieving revision 1.14
diff -u -p -r1.14 default.settings.php
--- sites/default/default.settings.php	21 Aug 2008 19:36:39 -0000	1.14
+++ sites/default/default.settings.php	25 Aug 2008 17:05:51 -0000
@@ -46,7 +46,7 @@
 /**
  * Database settings:
  *
- * The $databases array specifies the database connection or 
+ * The $databases array specifies the database connection or
  * connections that Drupal may use.  Drupal is able to connect
  * to multiple databases, including multiple types of databases,
  * during the same request.
@@ -62,7 +62,7 @@
  *   'host' => 'localhost',
  * );
  *
- * The "driver" property indicates what Drupal database driver the 
+ * The "driver" property indicates what Drupal database driver the
  * connection should use.  This is usually the same as the name of the
  * database type, such as mysql or sqlite, but not always.  The other
  * properties will vary depending on the driver.  For SQLite, you must
@@ -79,7 +79,7 @@
  * A target database allows Drupal to try to send certain queries to a
  * different database if it can but fall back to the default connection if not.
  * That is useful for master/slave replication, as Drupal may try to connect
- * to a slave server when appropriate and if one is not available will simply 
+ * to a slave server when appropriate and if one is not available will simply
  * fall back to the single master server.
  *
  * The general format for the $databases array is as follows:
