? coding-standards-299778-D7-UNSTABLE2.patch2 ? modules/syndication Index: install.php =================================================================== RCS file: /cvs/drupal/drupal/install.php,v retrieving revision 1.135 diff -u -p -r1.135 install.php --- install.php 11 Oct 2008 18:20:53 -0000 1.135 +++ install.php 12 Oct 2008 05:39:53 -0000 @@ -669,7 +669,7 @@ function install_tasks($profile, $task) // to the same address, until the batch finished callback is invoked // and the task advances to 'locale-initial-import'. if ($task == 'profile-install-batch') { - include_once DRUPAL_ROOT .'/includes/batch.inc'; + include_once DRUPAL_ROOT . '/includes/batch.inc'; $output = _batch_page(); } @@ -921,7 +921,7 @@ function install_check_requirements($pro 'title' => st('Settings file'), 'value' => st('The settings file does not exist.'), 'severity' => REQUIREMENT_ERROR, - 'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '%default_file' => $conf_path .'/default.settings.php')), + 'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '%default_file' => $conf_path . '/default.settings.php')), ); } elseif ($exists) { @@ -940,7 +940,7 @@ function install_check_requirements($pro } elseif ($writable) { $requirements['settings file'] = array( - 'title' => st('Settings file'), + 'title' => st('Settings file'), 'value' => st('Settings file is writable.'), ); } Index: update.php =================================================================== RCS file: /cvs/drupal/drupal/update.php,v retrieving revision 1.263 diff -u -p -r1.263 update.php --- update.php 12 Oct 2008 04:30:05 -0000 1.263 +++ update.php 12 Oct 2008 05:39:54 -0000 @@ -236,7 +236,7 @@ function update_script_selection_form() foreach (array_keys($updates) as $update) { if ($update > $schema_version) { // The description for an update comes from its Doxygen. - $func = new ReflectionFunction($module. '_update_'. $update); + $func = new ReflectionFunction($module . '_update_' . $update); $description = str_replace(array("\n", '*', '/'), '', $func->getDocComment()); $pending[] = "$update - $description"; if (!isset($default)) { @@ -329,7 +329,7 @@ function update_finished($success, $resu $_SESSION['update_results'] = $results; $_SESSION['update_success'] = $success; $_SESSION['updates_remaining'] = $operations; - + // Now that the update is done, we can disable site maintenance if it was // previously turned off. if (isset($_SESSION['site_offline']) && $_SESSION['site_offline'] == FALSE) { Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.233 diff -u -p -r1.233 bootstrap.inc --- includes/bootstrap.inc 12 Oct 2008 02:47:50 -0000 1.233 +++ includes/bootstrap.inc 12 Oct 2008 05:39:54 -0000 @@ -1563,7 +1563,7 @@ function registry_load_path_files($retur $menu = menu_get_item(); $cache = cache_get('registry:' . $menu['path'], 'cache_registry'); if (!empty($cache->data)) { - foreach(explode(';', $cache->data) as $file) { + foreach (explode(';', $cache->data) as $file) { require_once DRUPAL_ROOT . '/' . $file; $file_cache_data[] = $file; } Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.806 diff -u -p -r1.806 common.inc --- includes/common.inc 12 Oct 2008 04:30:05 -0000 1.806 +++ includes/common.inc 12 Oct 2008 05:39:57 -0000 @@ -2704,7 +2704,7 @@ function drupal_system_listing($mask, $d /** * Hands off structured Drupal arrays to type-specific *_alter implementations. - * + * * This dispatch function hands off structured Drupal arrays to type-specific * *_alter implementations. It ensures a consistent interface for all altering * operations. @@ -3340,7 +3340,7 @@ function drupal_write_record($table, &$o $query .= $field . ' = ' . $placeholders[$id]; } - foreach ($update as $key){ + foreach ($update as $key) { $conditions[] = "$key = " . db_type_placeholder($schema['fields'][$key]['type']); $values[] = $object->$key; } Index: includes/file.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/file.inc,v retrieving revision 1.139 diff -u -p -r1.139 file.inc --- includes/file.inc 12 Oct 2008 04:30:05 -0000 1.139 +++ includes/file.inc 12 Oct 2008 05:39:59 -0000 @@ -1779,7 +1779,7 @@ function file_get_mimetype($filename, $m )); } foreach ($mapping as $ext_preg => $mime_match) { - if (preg_match('!\.('. $ext_preg .')$!i', $filename)) { + if (preg_match('!\.(' . $ext_preg . ')$!i', $filename)) { return $mime_match; } } Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.294 diff -u -p -r1.294 form.inc --- includes/form.inc 12 Oct 2008 04:30:05 -0000 1.294 +++ includes/form.inc 12 Oct 2008 05:40:01 -0000 @@ -1761,7 +1761,7 @@ function form_process_radios($element) { /** * Add input format selector to text elements with the #input_format property. * - * The #input_format property should be the ID of an input format, found in + * The #input_format property should be the ID of an input format, found in * {filter_formats}.format, which gets passed to filter_form(). * * If the property #input_format is set, the form element will be expanded into @@ -1777,7 +1777,7 @@ function form_process_radios($element) { * '#type' => 'textarea', * '#title' => t('Body'), * '#input_format' => isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT, - * ); + * ); * @endcode * * Becomes: Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.73 diff -u -p -r1.73 install.inc --- includes/install.inc 11 Oct 2008 22:46:21 -0000 1.73 +++ includes/install.inc 12 Oct 2008 05:40:01 -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; } @@ -465,7 +465,7 @@ function drupal_verify_profile($profile, $missing_modules = array_diff($module_list, $present_modules); $requirements = array(); - + if (count($missing_modules)) { $modules = array(); foreach ($missing_modules as $module) { @@ -543,7 +543,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']; @@ -567,7 +567,7 @@ function drupal_install_system() { require_once DRUPAL_ROOT . '/' . $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); @@ -827,7 +827,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. * @@ -926,7 +926,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.189 diff -u -p -r1.189 locale.inc --- includes/locale.inc 12 Oct 2008 04:30:05 -0000 1.189 +++ includes/locale.inc 12 Oct 2008 05:40:03 -0000 @@ -97,7 +97,7 @@ function theme_locale_languages_overview $header = array(array('data' => t('English name')), array('data' => t('Native name')), array('data' => t('Code')), array('data' => t('Direction')), array('data' => t('Enabled')), array('data' => t('Default')), array('data' => t('Weight')), array('data' => t('Operations'))); $output = theme('table', $header, $rows, array('id' => 'language-order')); $output .= drupal_render($form); - + drupal_add_tabledrag('language-order', 'order', 'sibling', 'language-order-weight'); return $output; @@ -1952,19 +1952,19 @@ function _locale_translate_seek() { case 'translated': $where = "WHERE (t.translation LIKE ?)"; $orderby = "ORDER BY t.translation"; - $arguments[] = '%'. $query['string'] .'%'; + $arguments[] = '%' . $query['string'] . '%'; break; case 'untranslated': $where = "WHERE (s.source LIKE ? AND t.translation IS NULL)"; $orderby = "ORDER BY s.source"; - $arguments[] = '%'. $query['string'] .'%'; + $arguments[] = '%' . $query['string'] . '%'; break; case 'all' : default: $where = "WHERE (s.source LIKE ? OR t.translation LIKE ?)"; $orderby = ''; - $arguments[] = '%'. $query['string'] .'%'; - $arguments[] = '%'. $query['string'] .'%'; + $arguments[] = '%' . $query['string'] . '%'; + $arguments[] = '%' . $query['string'] . '%'; break; } $grouplimit = ''; Index: includes/mail.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/mail.inc,v retrieving revision 1.16 diff -u -p -r1.16 mail.inc --- includes/mail.inc 6 Oct 2008 11:00:01 -0000 1.16 +++ includes/mail.inc 12 Oct 2008 05:40:04 -0000 @@ -42,7 +42,7 @@ * function example_mail($key, &$message, $params) { * $language = $message['language']; * $variables = user_mail_tokens($params['account'], $language); - * switch($key) { + * switch ($key) { * case 'notice': * $message['subject'] = t('Notification from !site', $variables, $language->language); * $message['body'] = t("Dear !username\n\nThere is new content available on the site.", $variables, $language->language); Index: includes/menu.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/menu.inc,v retrieving revision 1.293 diff -u -p -r1.293 menu.inc --- includes/menu.inc 8 Oct 2008 01:42:16 -0000 1.293 +++ includes/menu.inc 12 Oct 2008 05:40:05 -0000 @@ -207,7 +207,7 @@ define('MENU_SITE_OFFLINE', 4); * Menu tree */ - /** +/** * The maximum number of path elements for a menu callback */ define('MENU_MAX_PARTS', 7); @@ -1890,7 +1890,7 @@ function _menu_delete_item($item, $force * - plid The mlid of the parent. * - router_path The path of the relevant router item. * @return - * The mlid of the saved menu link, or FALSE if the menu link could not be + * The mlid of the saved menu link, or FALSE if the menu link could not be * saved. */ function menu_link_save(&$item) { @@ -1962,7 +1962,7 @@ function menu_link_save(&$item) { if (!$existing_item) { db_query("INSERT INTO {menu_links} ( - menu_name, plid, link_path, + menu_name, plid, link_path, hidden, external, has_children, expanded, weight, module, link_title, options, Index: includes/session.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/session.inc,v retrieving revision 1.61 diff -u -p -r1.61 session.inc --- includes/session.inc 11 Oct 2008 16:37:38 -0000 1.61 +++ includes/session.inc 12 Oct 2008 05:40:06 -0000 @@ -222,7 +222,7 @@ function drupal_session_destroy_uid($uid * * @param int $lifetime * The value of session.gc_maxlifetime, passed by PHP. - * Sessions not updated for more than $lifetime seconds will be removed. + * Sessions not updated for more than $lifetime seconds will be removed. */ function _sess_gc($lifetime) { // Be sure to adjust 'php_value session.gc_maxlifetime' to a large enough Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.438 diff -u -p -r1.438 theme.inc --- includes/theme.inc 12 Oct 2008 04:30:05 -0000 1.438 +++ includes/theme.inc 12 Oct 2008 05:40:07 -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: includes/database/database.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/database.inc,v retrieving revision 1.12 diff -u -p -r1.12 database.inc --- includes/database/database.inc 8 Oct 2008 11:21:37 -0000 1.12 +++ includes/database/database.inc 12 Oct 2008 05:40:09 -0000 @@ -43,7 +43,7 @@ define('DB_ERROR', 'a515ac9c2796ca0e23ad * @code * $result = db_query_range('SELECT n.nid, n.title, n.created * FROM {node} n WHERE n.uid = :uid', array(':uid' => $uid), 0, 10); - * foreach($result as $record) { + * foreach ($result as $record) { * // Perform operations on $node->title, etc. here. * } * @endcode @@ -283,7 +283,7 @@ abstract class DatabaseConnection extend * A table prefix-parsed string for the sequence name. */ public function makeSequenceName($table, $field) { - return $this->prefixTables('{'. $table .'}_'. $field .'_seq'); + return $this->prefixTables('{' . $table . '}_' . $field . '_seq'); } /** @@ -552,7 +552,7 @@ abstract class DatabaseConnection extend * A database query result resource, or NULL if the query was not executed * correctly. */ - abstract public function queryRange($query, Array $args, $from, $count, Array $options); + abstract public function queryRange($query, Array $args, $from, $count, Array $options); /** * Runs a SELECT query and stores its results in a temporary table. @@ -577,7 +577,7 @@ abstract class DatabaseConnection extend * A database query result resource, or FALSE if the query was not executed * correctly. */ - abstract function queryTemporary($query, Array $args, $tablename); + abstract function queryTemporary($query, Array $args, $tablename); /** * Returns the type of database driver. @@ -2025,7 +2025,7 @@ function db_rewrite_sql($query, $primary if ($where) { $n = strlen($matches[1]); $second_part = substr($query, $n); - $first_part = substr($matches[1], 0, $n - 5) ." $join WHERE $where AND ( "; + $first_part = substr($matches[1], 0, $n - 5) . " $join WHERE $where AND ( "; // PHP 4 does not support strrpos for strings. We emulate it. $haystack_reverse = strrev($second_part); // No need to use strrev on the needle, we supply GROUP, ORDER, LIMIT Index: includes/database/query.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/query.inc,v retrieving revision 1.5 diff -u -p -r1.5 query.inc --- includes/database/query.inc 6 Oct 2008 14:39:40 -0000 1.5 +++ includes/database/query.inc 12 Oct 2008 05:40:11 -0000 @@ -422,7 +422,7 @@ class InsertQuery extends Query { $placeholders = array_pad($placeholders, count($this->defaultFields), 'default'); $placeholders = array_pad($placeholders, count($this->insertFields), '?'); - return 'INSERT INTO {'. $this->table .'} ('. implode(', ', $insert_fields) .') VALUES ('. implode(', ', $placeholders) .')'; + return 'INSERT INTO {' . $this->table . '} (' . implode(', ', $insert_fields) . ') VALUES (' . implode(', ', $placeholders) . ')'; } } @@ -563,7 +563,7 @@ class MergeQuery extends Query { * The called object. */ public function update(Array $fields, Array $values = array()) { - if ($values) { + if ($values) { $fields = array_combine($fields, $values); } $this->updateFields = $fields; Index: includes/database/mysql/query.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/mysql/query.inc,v retrieving revision 1.3 diff -u -p -r1.3 query.inc --- includes/database/mysql/query.inc 27 Sep 2008 20:10:26 -0000 1.3 +++ includes/database/mysql/query.inc 12 Oct 2008 05:40:11 -0000 @@ -55,16 +55,16 @@ class InsertQuery_mysql extends InsertQu $new_placeholder = $max_placeholder + count($insert_values); for ($i = $max_placeholder; $i < $new_placeholder; ++$i) { - $placeholders[] = ':db_insert_placeholder_'. $i; + $placeholders[] = ':db_insert_placeholder_' . $i; } $max_placeholder = $new_placeholder; - $values[] = '('. implode(', ', $placeholders) .')'; + $values[] = '(' . implode(', ', $placeholders) . ')'; } } else { // If there are no values, then this is a default-only query. We still need to handle that. $placeholders = array_fill(0, count($this->defaultFields), 'default'); - $values[] = '(' . implode(', ', $placeholders) .')'; + $values[] = '(' . implode(', ', $placeholders) . ')'; } $query .= implode(', ', $values); Index: includes/database/mysql/schema.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/mysql/schema.inc,v retrieving revision 1.4 diff -u -p -r1.4 schema.inc --- includes/database/mysql/schema.inc 8 Oct 2008 11:09:16 -0000 1.4 +++ includes/database/mysql/schema.inc 12 Oct 2008 05:40:11 -0000 @@ -184,7 +184,7 @@ class DatabaseSchema_mysql extends Datab } if (!empty($spec['unique keys'])) { foreach ($spec['unique keys'] as $key => $fields) { - $keys[] = 'UNIQUE KEY ' . $key .' ('. $this->createKeysSqlHelper($fields) . ')'; + $keys[] = 'UNIQUE KEY ' . $key . ' (' . $this->createKeysSqlHelper($fields) . ')'; } } if (!empty($spec['indexes'])) { @@ -299,7 +299,7 @@ class DatabaseSchema_mysql extends Datab } 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)); + $sql = 'ALTER TABLE {' . $table . '} CHANGE `' . $field . '` ' . $this->createFieldSql($field_new, $this->processField($spec)); if (count($keys_new)) { $sql .= ', ADD ' . implode(', ADD ', $this->createKeysSql($keys_new)); } Index: includes/database/pgsql/query.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/pgsql/query.inc,v retrieving revision 1.2 diff -u -p -r1.2 query.inc --- includes/database/pgsql/query.inc 15 Sep 2008 20:48:07 -0000 1.2 +++ includes/database/pgsql/query.inc 12 Oct 2008 05:40:11 -0000 @@ -43,7 +43,7 @@ class InsertQuery_pgsql extends InsertQu break; default: - $stmt->bindParam(':db_insert_placeholder_'. $max_placeholder++, $insert_values[$idx]); + $stmt->bindParam(':db_insert_placeholder_' . $max_placeholder++, $insert_values[$idx]); break; } } @@ -94,7 +94,7 @@ class InsertQuery_pgsql extends InsertQu else { // If there are no values, then this is a default-only query. We still need to handle that. $placeholders = array_fill(0, count($this->defaultFields), 'default'); - $values[] = '(' . implode(', ', $placeholders) .')'; + $values[] = '(' . implode(', ', $placeholders) . ')'; } $query .= implode(', ', $values); Index: modules/blogapi/blogapi.module =================================================================== RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v retrieving revision 1.132 diff -u -p -r1.132 blogapi.module --- modules/blogapi/blogapi.module 12 Oct 2008 02:58:23 -0000 1.132 +++ modules/blogapi/blogapi.module 12 Oct 2008 05:40:11 -0000 @@ -328,10 +328,10 @@ function blogapi_blogger_get_post($appke * TRUE if no error, or the blogapi_error(). */ function blogapi_status_error_check($node, $original_status) { - + $node = (object) $node; - $node_type_default = variable_get('node_options_'. $node->type, array('status', 'promote')); + $node_type_default = variable_get('node_options_' . $node->type, array('status', 'promote')); // If we don't have the 'administer nodes' permission and the status is // changing or for a new node the status is not the content type's default, @@ -584,7 +584,7 @@ function blogapi_mt_validate_terms($node $term_list = array_unique($node->taxonomy); $params = $term_list; $params[] = $node->type; - $result = db_query(db_rewrite_sql("SELECT t.tid, t.vid FROM {term_data} t INNER JOIN {vocabulary_node_types} n ON t.vid = n.vid WHERE t.tid IN (". db_placeholders($term_list) .") AND n.type = '%s'", 't', 'tid'), $params); + $result = db_query(db_rewrite_sql("SELECT t.tid, t.vid FROM {term_data} t INNER JOIN {vocabulary_node_types} n ON t.vid = n.vid WHERE t.tid IN (" . db_placeholders($term_list) . ") AND n.type = '%s'", 't', 'tid'), $params); $found_terms = array(); $found_count = 0; while ($term = db_fetch_object($result)) { @@ -768,7 +768,7 @@ function blogapi_admin_settings() { '#field_suffix' => t('MB') ); - $form['settings_general']['upload_max_size'] = array('#value' => '

'. t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))).'

'); + $form['settings_general']['upload_max_size'] = array('#value' => '

' . t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) . '

'); $roles = user_roles(FALSE, 'administer content with blog api'); $form['roles'] = array('#type' => 'value', '#value' => $roles); @@ -971,4 +971,3 @@ function _blogapi_get_node_types() { function _blogapi_space_used($uid) { return db_query('SELECT SUM(filesize) FROM {blogapi_files} f WHERE f.uid = :uid', array(':uid' => $uid))->fetchField(); } - Index: modules/book/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.module,v retrieving revision 1.471 diff -u -p -r1.471 book.module --- modules/book/book.module 9 Oct 2008 15:15:50 -0000 1.471 +++ modules/book/book.module 12 Oct 2008 05:40:11 -0000 @@ -324,11 +324,11 @@ function book_form_alter(&$form, $form_s $form['book']['pick-book'] = array( '#type' => 'submit', '#value' => t('Change book (update list of parents)'), - // Submit the node form so the parent select options get updated. - // This is typically only used when JS is disabled. Since the parent options - // won't be changed via AJAX, a button is provided in the node form to submit - // the form and generate options in the parent select corresponding to the - // selected book. This is similar to what happens during a node preview. + // Submit the node form so the parent select options get updated. + // This is typically only used when JS is disabled. Since the parent options + // won't be changed via AJAX, a button is provided in the node form to submit + // the form and generate options in the parent select corresponding to the + // selected book. This is similar to what happens during a node preview. '#submit' => array('node_form_submit_build_node'), '#weight' => 20, ); Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.656 diff -u -p -r1.656 comment.module --- modules/comment/comment.module 11 Oct 2008 21:10:59 -0000 1.656 +++ modules/comment/comment.module 12 Oct 2008 05:40:12 -0000 @@ -719,7 +719,7 @@ function comment_save($edit) { // Strip the "/" from the end of the parent thread. $parent->thread = (string) rtrim((string) $parent->thread, '/'); // Get the max value in *this* thread. - $max = db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE :thread AND nid = :nid", array(':thread' => $parent->thread .'%', ':nid' => $edit['nid']))->fetchField(); + $max = db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE :thread AND nid = :nid", array(':thread' => $parent->thread . '%', ':nid' => $edit['nid']))->fetchField(); if ($max == '') { // First child of this parent. Index: modules/comment/comment.test =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.test,v retrieving revision 1.15 diff -u -p -r1.15 comment.test --- modules/comment/comment.test 24 Sep 2008 22:38:20 -0000 1.15 +++ modules/comment/comment.test 12 Oct 2008 05:40:13 -0000 @@ -144,7 +144,7 @@ class CommentHelperCase extends DrupalWe * Comments per page value. */ function setCommentsPerPage($number) { - $this->setCommentSettings('comment_default_per_page_article', $number, 'Number of comments per page set to ' . $number .'.'); + $this->setCommentSettings('comment_default_per_page_article', $number, 'Number of comments per page set to ' . $number . '.'); } /** @@ -308,7 +308,7 @@ class CommentInterfaceTest extends Comme $this->assertText('This discussion is closed', t('Posting to node with comments disabled')); $this->assertNoField('edit-comment', t('Comment body field found.')); - // Attempt to post to node with read-only comments. + // Attempt to post to node with read-only comments. $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_READ_ONLY)); $this->assertTrue($this->node, t('Article node created.')); $this->drupalGet('comment/reply/' . $this->node->nid); @@ -449,14 +449,14 @@ class CommentAnonymous extends CommentHe $this->drupalLogin($this->admin_user); $this->setAnonymousUserComment(FALSE, FALSE); - // Attempt to view comments while disallowed. + // Attempt to view comments while disallowed. // NOTE: if authenticated user has permission to post comments, then a // "Login or register to post comments" type link may be shown. $this->drupalLogout(); $this->drupalGet('node/' . $this->node->nid); $this->assertNoRaw('
', t('Comments were not displayed.')); $this->assertNoLink('Add new comment', t('Link to add comment was found.')); - + // Attempt to view node-comment form while disallowed. $this->drupalGet('comment/reply/' . $this->node->nid); $this->assertText('You are not authorized to view comments', t('Error attempting to post comment.')); @@ -539,11 +539,11 @@ class CommentApprovalTest extends Commen // Approve comment. $this->drupalLogin($this->admin_user); - $this->drupalGet('node/'. $this->node->nid); + $this->drupalGet('node/' . $this->node->nid); $this->clickLink(t('approve')); $this->drupalLogout(); - $this->drupalGet('node/'. $this->node->nid); + $this->drupalGet('node/' . $this->node->nid); $this->assertTrue($this->commentExists($anonymous_comment4), t('Anonymous comment visible.')); } } Index: modules/contact/contact.test =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.test,v retrieving revision 1.12 diff -u -p -r1.12 contact.test --- modules/contact/contact.test 17 Sep 2008 06:54:11 -0000 1.12 +++ modules/contact/contact.test 12 Oct 2008 05:40:13 -0000 @@ -187,7 +187,7 @@ class ContactSitewideTestCase extends Dr $edit['reply'] = $reply; $edit['selected'] = ($selected ? '1' : '0'); $this->drupalPost('admin/build/contact/edit/' . $category_id, $edit, t('Save')); - return($category_id); + return ($category_id); } /** Index: modules/filter/filter.module =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v retrieving revision 1.229 diff -u -p -r1.229 filter.module --- modules/filter/filter.module 12 Oct 2008 04:30:06 -0000 1.229 +++ modules/filter/filter.module 12 Oct 2008 05:40:14 -0000 @@ -204,7 +204,7 @@ function filter_filter_tips($delta, $for 'tr' => NULL, 'td' => NULL, 'th' => NULL, 'del' => array( t('Deleted'), '' . t('Deleted') . ''), 'ins' => array( t('Inserted'), '' . t('Inserted') . ''), - // Assumes and describes li. + // Assumes and describes li. 'ol' => array( t('Ordered list - use the <li> to begin each list item'), '
  1. ' . t('First item') . '
  2. ' . t('Second item') . '
'), 'ul' => array( t('Unordered list - use the <li> to begin each list item'), ''), 'li' => NULL, @@ -307,7 +307,7 @@ function filter_formats($index = NULL) { if (!$all) { $or = db_or()->condition('format', variable_get('filter_default_format', 1)); foreach ($user->roles as $rid => $role) { - $or->condition('roles', '%'. (int)$rid .'%', 'LIKE'); + $or->condition('roles', '%' . (int)$rid . '%', 'LIKE'); } $query->condition($or); } Index: modules/forum/forum.module =================================================================== RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v retrieving revision 1.468 diff -u -p -r1.468 forum.module --- modules/forum/forum.module 11 Oct 2008 21:11:00 -0000 1.468 +++ modules/forum/forum.module 12 Oct 2008 05:40:15 -0000 @@ -156,9 +156,9 @@ function forum_init() { } /** - * _forum_nodeapi_check_node_type - * - * @param mixed $node + * _forum_nodeapi_check_node_type + * + * @param mixed $node * @param mixed $vocabulary * @access protected * @return bool @@ -235,7 +235,7 @@ function forum_nodeapi_prepare(&$node, $ /** * Implementation of hook_nodeapi_validate(). - * + * * Check in particular that only a "leaf" term in the associated taxonomy. */ function forum_nodeapi_validate(&$node, $teaser, $page) { Index: modules/menu/menu.module =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v retrieving revision 1.172 diff -u -p -r1.172 menu.module --- modules/menu/menu.module 12 Oct 2008 04:30:06 -0000 1.172 +++ modules/menu/menu.module 12 Oct 2008 05:40:15 -0000 @@ -328,7 +328,7 @@ function menu_nodeapi_update(&$node) { */ function menu_nodeapi_delete(&$node) { // Delete all menu module links that point to this node. - $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/'. $node->nid)); + $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/' . $node->nid)); while ($m = db_fetch_array($result)) { menu_link_delete($m['mlid']); } @@ -345,13 +345,13 @@ function menu_nodeapi_prepare(&$node) { 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/node/node.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v retrieving revision 1.27 diff -u -p -r1.27 node.admin.inc --- modules/node/node.admin.inc 12 Oct 2008 04:30:06 -0000 1.27 +++ modules/node/node.admin.inc 12 Oct 2008 05:40:16 -0000 @@ -472,15 +472,15 @@ function node_admin_nodes() { $header[] = array('data' => t('Operations')); $form['header'] = array( - '#type' => 'value', - '#value' => $header, + '#type' => 'value', + '#value' => $header, ); // Build the query and load the nodes we want to display. $filter = node_build_filter_query(); $sort = tablesort_sql($header, '', 'n.changed DESC'); - $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] . $sort), 50, 0, NULL, $filter['args']); + $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n ' . $filter['join'] . ' INNER JOIN {users} u ON n.uid = u.uid ' . $filter['where'] . $sort), 50, 0, NULL, $filter['args']); // Build the 'Update options' form. $form['options'] = array( Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.985 diff -u -p -r1.985 node.module --- modules/node/node.module 12 Oct 2008 04:30:06 -0000 1.985 +++ modules/node/node.module 12 Oct 2008 05:40:18 -0000 @@ -1218,14 +1218,14 @@ function _node_rankings() { ); if ($ranking = module_invoke_all('ranking')) { foreach ($ranking as $rank => $values) { - if ($node_rank = variable_get('node_rank_'. $rank, 0)) { + if ($node_rank = variable_get('node_rank_' . $rank, 0)) { // If the table defined in the ranking isn't already joined, then add it. if (isset($values['join']) && !isset($rankings['join'][$values['join']])) { $rankings['join'][$values['join']] = $values['join']; } // Add the rankings weighted score multiplier value, handling NULL gracefully. - $rankings['score'][] = '%f * COALESCE(('. $values['score'] .'), 0)'; + $rankings['score'][] = '%f * COALESCE((' . $values['score'] . '), 0)'; // Add the the administrator's weighted score multiplier value for this ranking. $rankings['total'] += $node_rank; @@ -1274,11 +1274,11 @@ function node_search($op = 'search', $ke // Note: reversed to reflect that higher number = higher ranking. $options = drupal_map_assoc(range(0, 10)); foreach (module_invoke_all('ranking') as $var => $values) { - $form['content_ranking']['factors']['node_rank_'. $var] = array( + $form['content_ranking']['factors']['node_rank_' . $var] = array( '#title' => $values['title'], '#type' => 'select', '#options' => $options, - '#default_value' => variable_get('node_rank_'. $var, 0), + '#default_value' => variable_get('node_rank_' . $var, 0), ); } return $form; @@ -1335,7 +1335,7 @@ function node_search($op = 'search', $ke $total = $rankings['total']; $arguments2 = $rankings['arguments']; $join2 = implode(' ', $rankings['join']); - $select2 = '('. implode(' + ', $rankings['score']) .') AS score'; + $select2 = '(' . implode(' + ', $rankings['score']) . ') AS score'; } // Do search. Index: modules/node/node.test =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.test,v retrieving revision 1.7 diff -u -p -r1.7 node.test --- modules/node/node.test 11 Oct 2008 18:29:20 -0000 1.7 +++ modules/node/node.test 12 Oct 2008 05:40:18 -0000 @@ -431,7 +431,7 @@ class NodeTitleXSSTestCase extends Drupa * Implementation of getInfo(). */ function getInfo() { - return array( + return array( 'name' => t('Node title XSS filtering'), 'description' => t('Create a node with dangerous tags in its title and test that they are escaped.'), 'group' => t('Node'), Index: modules/openid/openid.js =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/openid.js,v retrieving revision 1.6 diff -u -p -r1.6 openid.js --- modules/openid/openid.js 30 Jan 2008 22:11:22 -0000 1.6 +++ modules/openid/openid.js 12 Oct 2008 05:40:19 -0000 @@ -14,8 +14,8 @@ Drupal.behaviors.openid = function (cont $("li.openid-link:not(.openid-processed)", context) .addClass('openid-processed') .click( function() { - $loginElements.hide(); - $openidElements.css("display", "block"); + $loginElements.hide(); + $openidElements.css("display", "block"); // Remove possible error message. $("#edit-name, #edit-pass").removeClass("error"); $("div.messages.error").hide(); @@ -26,8 +26,8 @@ Drupal.behaviors.openid = function (cont $("li.user-link:not(.openid-processed)", context) .addClass('openid-processed') .click(function() { - $openidElements.hide(); - $loginElements.css("display", "block"); + $openidElements.hide(); + $loginElements.css("display", "block"); // Clear OpenID Identifier field and remove possible error message. $("#edit-openid-identifier").val('').removeClass("error"); $("div.messages.error").css("display", "block"); Index: modules/path/path.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v retrieving revision 1.12 diff -u -p -r1.12 path.admin.inc --- modules/path/path.admin.inc 11 Oct 2008 21:11:01 -0000 1.12 +++ modules/path/path.admin.inc 12 Oct 2008 05:40:19 -0000 @@ -22,7 +22,7 @@ function path_admin_overview($keys = NUL // Replace wildcards with PDO wildcards. $keys = preg_replace('!\*+!', '%', $keys); $sql = "SELECT * FROM {url_alias} WHERE dst LIKE :keys"; - $args = array(':keys' => '%'. $keys .'%'); + $args = array(':keys' => '%' . $keys . '%'); } else { $sql = 'SELECT * FROM {url_alias}'; Index: modules/poll/poll.module =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v retrieving revision 1.277 diff -u -p -r1.277 poll.module --- modules/poll/poll.module 12 Oct 2008 04:30:07 -0000 1.277 +++ modules/poll/poll.module 12 Oct 2008 05:40:20 -0000 @@ -242,7 +242,7 @@ function poll_form(&$node, $form_state) $delta = count($node->choice); $weight = -$delta; foreach ($node->choice as $chid => $choice) { - $key = 'chid:'. $chid; + $key = 'chid:' . $chid; $form['choice_wrapper']['choice'][$key] = _poll_choice_form($key, $choice['chid'], $choice['chtext'], $choice['chvotes'], $choice['weight'], $choice_count); $weight = ($choice['weight'] > $weight) ? $choice['weight'] : $weight; } @@ -251,7 +251,7 @@ function poll_form(&$node, $form_state) // Add initial or additional choices. $existing_delta = $delta; for ($delta; $delta < $choice_count; $delta++) { - $key = 'new:'. ($delta - $existing_delta); + $key = 'new:' . ($delta - $existing_delta); $form['choice_wrapper']['choice'][$key] = _poll_choice_form($key, NULL, '', 0, $weight, $choice_count); } @@ -371,7 +371,7 @@ function poll_choice_js() { } $delta = count($_POST['choice']); - $key = isset($form['#node']->choice) ? 'new:'. ($delta - count($form['#node']->choice)) : 'new:'. $delta; + $key = isset($form['#node']->choice) ? 'new:' . ($delta - count($form['#node']->choice)) : 'new:' . $delta; // Match the new choice at the current greatest weight. $weight = 0; @@ -384,7 +384,7 @@ function poll_choice_js() { drupal_alter('form', $form_element, array(), 'poll_choice_js'); // Dynamically increase the delta of the weight field for every field added. - foreach(element_children($form['choice_wrapper']['choice']) as $n) { + foreach (element_children($form['choice_wrapper']['choice']) as $n) { $form['choice_wrapper']['choice'][$n]['weight']['#delta'] = $delta + 1; } @@ -408,7 +408,7 @@ function poll_choice_js() { // Render the new output. $choice_form = $form['choice_wrapper']['choice']; unset($choice_form['#prefix'], $choice_form['#suffix']); // Prevent duplicate wrappers. - $choice_form[$key]['#attributes']['class'] = empty($choice_form[$key]['#attributes']['class']) ? 'ahah-new-content' : $choice_form[$key]['#attributes']['class'] .' ahah-new-content'; + $choice_form[$key]['#attributes']['class'] = empty($choice_form[$key]['#attributes']['class']) ? 'ahah-new-content' : $choice_form[$key]['#attributes']['class'] . ' ahah-new-content'; $choice_form[$key]['chvotes']['#value'] = 0; $output = theme('status_messages') . drupal_render($choice_form); @@ -741,7 +741,7 @@ function theme_poll_choices($form) { ); // Add any additional classes set on the row. - $row['class'] .= isset($form[$key]['#attributes']['class']) ? ' '. $form[$key]['#attributes']['class'] : ''; + $row['class'] .= isset($form[$key]['#attributes']['class']) ? ' ' . $form[$key]['#attributes']['class'] : ''; $rows[] = $row; } @@ -839,4 +839,3 @@ function poll_cancel($form, &$form_state function poll_user_delete(&$edit, &$user) { db_query('UPDATE {poll_votes} SET uid = 0 WHERE uid = %d', $user->uid); } - Index: modules/poll/poll.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.pages.inc,v retrieving revision 1.7 diff -u -p -r1.7 poll.pages.inc --- modules/poll/poll.pages.inc 11 Oct 2008 21:11:01 -0000 1.7 +++ modules/poll/poll.pages.inc 12 Oct 2008 05:40:20 -0000 @@ -35,7 +35,7 @@ function poll_votes($node) { $header[] = array('data' => t('Vote'), 'field' => 'pv.chorder'); $header[] = array('data' => t('Vote'), 'field' => 'pc.weight'); - $result = pager_query("SELECT pv.chid, pv.uid, pv.hostname, u.name FROM {poll_votes} pv INNER JOIN {poll_choices} pc ON pv.chid = pc.chid LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d". tablesort_sql($header), 20, 0, NULL, $node->nid); + $result = pager_query("SELECT pv.chid, pv.uid, pv.hostname, u.name FROM {poll_votes} pv INNER JOIN {poll_choices} pc ON pv.chid = pc.chid LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d" . tablesort_sql($header), 20, 0, NULL, $node->nid); $rows = array(); while ($vote = db_fetch_object($result)) { $rows[] = array( Index: modules/poll/poll.test =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.test,v retrieving revision 1.5 diff -u -p -r1.5 poll.test --- modules/poll/poll.test 5 Aug 2008 18:07:14 -0000 1.5 +++ modules/poll/poll.test 12 Oct 2008 05:40:20 -0000 @@ -25,7 +25,7 @@ class PollTestCase extends DrupalWebTest if (count($choices) > 2) { // Re-submit the form while the choices are all in - while($index < count($choices)) { + while ($index < count($choices)) { $this->drupalPost(NULL, $edit, t('More choices')); list($edit, $index) = $this->_pollGenerateEdit($title, $choices, $index); } @@ -33,7 +33,7 @@ class PollTestCase extends DrupalWebTest if ($test_preview) { $this->drupalPost(NULL, $edit, t('Preview')); - foreach($choices as $k => $choice_text) { + foreach ($choices as $k => $choice_text) { $this->assertRaw($choice_text, t('Choice @choice found was in preview.', array('@choice' => $k))); } list($edit, $index) = $this->_pollGenerateEdit($title, $choices, $index); @@ -55,10 +55,10 @@ class PollTestCase extends DrupalWebTest $edit = array( 'title' => $title ); - foreach($already_submitted_choices as $k => $text) { + foreach ($already_submitted_choices as $k => $text) { $edit['choice[chid:' . $k . '][chtext]'] = $text; } - foreach($new_choices as $k => $text) { + foreach ($new_choices as $k => $text) { $edit['choice[new:' . $k . '][chtext]'] = $text; } return array($edit, count($already_submitted_choices) + count($new_choices)); @@ -66,7 +66,7 @@ class PollTestCase extends DrupalWebTest function _generateChoices($count = 7) { $choices = array(); - for($i = 1; $i <= $count; $i++) { + for ($i = 1; $i <= $count; $i++) { $choices[] = $this->randomName(); } return $choices; @@ -122,7 +122,7 @@ class PollVoteTestCase extends PollTestC $edit = array ( 'choice' => '1', ); - $this->drupalPost('node/'. $poll_nid, $edit, t('Vote')); + $this->drupalPost('node/' . $poll_nid, $edit, t('Vote')); $this->assertText('Your vote was recorded.', 'Your vote was recorded.'); $this->drupalGet("node/$poll_nid/votes"); @@ -130,4 +130,3 @@ class PollVoteTestCase extends PollTestC $this->assertText($choices[0], 'Vote recorded'); } } - Index: modules/profile/profile.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v retrieving revision 1.15 diff -u -p -r1.15 profile.admin.inc --- modules/profile/profile.admin.inc 12 Oct 2008 04:30:08 -0000 1.15 +++ modules/profile/profile.admin.inc 12 Oct 2008 05:40:21 -0000 @@ -397,7 +397,7 @@ function profile_field_delete_submit($fo */ function profile_admin_settings_autocomplete($string) { $matches = array(); - $result = db_query_range("SELECT category FROM {profile_fields} WHERE LOWER(category) LIKE LOWER(:category)", array(':category' => $string .'%'), 0, 10); + $result = db_query_range("SELECT category FROM {profile_fields} WHERE LOWER(category) LIKE LOWER(:category)", array(':category' => $string . '%'), 0, 10); while ($data = db_fetch_object($result)) { $matches[$data->category] = check_plain($data->category); } Index: modules/profile/profile.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v retrieving revision 1.6 diff -u -p -r1.6 profile.pages.inc --- modules/profile/profile.pages.inc 12 Oct 2008 04:30:08 -0000 1.6 +++ modules/profile/profile.pages.inc 12 Oct 2008 05:40:21 -0000 @@ -112,7 +112,7 @@ function profile_autocomplete($field, $s 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, - ':value' => $string .'%', + ':value' => $string . '%', ), 0, 10); while ($data = db_fetch_object($result)) { $matches[$data->value] = check_plain($data->value); Index: modules/profile/profile.test =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.test,v retrieving revision 1.7 diff -u -p -r1.7 profile.test --- modules/profile/profile.test 10 Oct 2008 07:49:49 -0000 1.7 +++ modules/profile/profile.test 12 Oct 2008 05:40:21 -0000 @@ -280,7 +280,7 @@ class ProfileTestAutocomplete extends Pr // Set some html for what we want to see in the page output later. $autocomplete_html = ''; - $field_html = ''; + $field_html = ''; // Check that autocompletion html is found on the user's profile edit page. $this->drupalGet('user/' . $this->admin_user->uid . '/edit/' . $category); Index: modules/search/search-block-form.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search-block-form.tpl.php,v retrieving revision 1.1 diff -u -p -r1.1 search-block-form.tpl.php --- modules/search/search-block-form.tpl.php 31 Oct 2007 18:06:38 -0000 1.1 +++ modules/search/search-block-form.tpl.php 12 Oct 2008 05:40:21 -0000 @@ -27,7 +27,7 @@ * * To check for all available data within $search, use the code below. * - * '. check_plain(print_r($search, 1)) .''; ?> + * ' . check_plain(print_r($search, 1)) . ''; ?> * * @see template_preprocess_search_block_form() */ Index: modules/search/search-result.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search-result.tpl.php,v retrieving revision 1.2 diff -u -p -r1.2 search-result.tpl.php --- modules/search/search-result.tpl.php 28 Aug 2008 08:21:27 -0000 1.2 +++ modules/search/search-result.tpl.php 12 Oct 2008 05:40:21 -0000 @@ -41,7 +41,7 @@ * * To check for all available data within $info_split, use the code below. * - * '. check_plain(print_r($info_split, 1)) .''; ?> + * ' . check_plain(print_r($info_split, 1)) . ''; ?> * * @see template_preprocess_search_result() */ Index: modules/search/search-theme-form.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search-theme-form.tpl.php,v retrieving revision 1.1 diff -u -p -r1.1 search-theme-form.tpl.php --- modules/search/search-theme-form.tpl.php 31 Oct 2007 18:06:38 -0000 1.1 +++ modules/search/search-theme-form.tpl.php 12 Oct 2008 05:40:21 -0000 @@ -28,7 +28,7 @@ * * To check for all available data within $search, use the code below. * - * '. check_plain(print_r($search, 1)) .''; ?> + * ' . check_plain(print_r($search, 1)) . ''; ?> * * @see template_preprocess_search_theme_form() */ Index: modules/search/search.module =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.module,v retrieving revision 1.269 diff -u -p -r1.269 search.module --- modules/search/search.module 12 Oct 2008 04:30:08 -0000 1.269 +++ modules/search/search.module 12 Oct 2008 05:40:21 -0000 @@ -579,8 +579,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.49 diff -u -p -r1.49 drupal_web_test_case.php --- modules/simpletest/drupal_web_test_case.php 12 Oct 2008 04:30:08 -0000 1.49 +++ modules/simpletest/drupal_web_test_case.php 12 Oct 2008 05:40:22 -0000 @@ -467,7 +467,7 @@ class DrupalWebTestCase { // Make sure type is valid. if (in_array($type, array('binary', 'html', 'image', 'javascript', 'php', 'sql', 'text'))) { - // Use original file directory instead of one created during setUp(). + // Use original file directory instead of one created during setUp(). $path = $this->original_file_directory . '/simpletest'; $files = file_scan_directory($path, '/' . $type . '\-.*/'); Index: modules/simpletest/simpletest.install =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.install,v retrieving revision 1.11 diff -u -p -r1.11 simpletest.install --- modules/simpletest/simpletest.install 9 Oct 2008 00:02:29 -0000 1.11 +++ modules/simpletest/simpletest.install 12 Oct 2008 05:40:22 -0000 @@ -66,7 +66,7 @@ function simpletest_generate_file($filen break; } } - $text = wordwrap($text, $width - 1, "\n", TRUE) ."\n"; // Add \n for symetrical file. + $text = wordwrap($text, $width - 1, "\n", TRUE) . "\n"; // Add \n for symetrical file. // Create filename. $path = file_directory_path() . '/simpletest/'; Index: modules/simpletest/simpletest.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v retrieving revision 1.19 diff -u -p -r1.19 simpletest.module --- modules/simpletest/simpletest.module 9 Oct 2008 15:15:52 -0000 1.19 +++ modules/simpletest/simpletest.module 12 Oct 2008 05:40:22 -0000 @@ -7,11 +7,11 @@ function simpletest_help($path, $arg) { switch ($path) { case 'admin/help#simpletest': - $output = '

' . t('The SimpleTest module is a framework for running automated unit tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules.') .'

'; - $output .= '

' . t('Visit Administer >> Site building >> SimpleTest to display a list of available tests. For comprehensive testing, select all tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.)', array('@admin-simpletest' => url('admin/build/testing'))) .'

'; - $output .= '

' . t('After the tests have run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that a test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were fails or exceptions, the results are expanded, and the tests that had issues will be indicated in red or pink rows. Use these results to refine your code and tests until all tests return a pass.') .'

'; - $output .= '

' . t('For more information on creating and modifying your own tests, see the SimpleTest API Documentation in the Drupal handbook.', array('@simpletest-api' => 'http://drupal.org/simpletest')) .'

'; - $output .= '

' . t('For more information, see the online handbook entry for SimpleTest module.', array('@simpletest' => 'http://drupal.org/handbook/modules/simpletest')) .'

'; + $output = '

' . t('The SimpleTest module is a framework for running automated unit tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules.') . '

'; + $output .= '

' . t('Visit Administer >> Site building >> SimpleTest to display a list of available tests. For comprehensive testing, select all tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.)', array('@admin-simpletest' => url('admin/build/testing'))) . '

'; + $output .= '

' . t('After the tests have run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that a test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were fails or exceptions, the results are expanded, and the tests that had issues will be indicated in red or pink rows. Use these results to refine your code and tests until all tests return a pass.') . '

'; + $output .= '

' . t('For more information on creating and modifying your own tests, see the SimpleTest API Documentation in the Drupal handbook.', array('@simpletest-api' => 'http://drupal.org/simpletest')) . '

'; + $output .= '

' . t('For more information, see the online handbook entry for SimpleTest module.', array('@simpletest' => 'http://drupal.org/handbook/modules/simpletest')) . '

'; return $output; } } @@ -102,7 +102,7 @@ function simpletest_test_form() { // This reporter can only handle pass, fail and exception. if (isset($map[$status])) { $element['#title'] = $info['name']; - $status_index = '#'. $status; + $status_index = '#' . $status; $form['summary'][$status_index]++; $group_summary[$group][$status_index]++; $element['summary'][$status_index]++; @@ -263,7 +263,7 @@ function theme_simpletest_test_table($ta $row[] = '
' . $description . '
'; $rows[] = array('data' => $row, 'class' => $test_class . '-test js-hide'); } - $js['simpletest-test-group-'. $test_class] = $current_js; + $js['simpletest-test-group-' . $test_class] = $current_js; unset($table[$key]); } @@ -279,7 +279,7 @@ function theme_simpletest_test_table($ta } function theme_simpletest_result_summary($form, $text = NULL) { - return '
' . _simpletest_format_summary_line($form) . '
'; + return '
' . _simpletest_format_summary_line($form) . '
'; } function _simpletest_format_summary_line($summary) { Index: modules/simpletest/simpletest.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.test,v retrieving revision 1.9 diff -u -p -r1.9 simpletest.test --- modules/simpletest/simpletest.test 15 Sep 2008 20:48:09 -0000 1.9 +++ modules/simpletest/simpletest.test 12 Oct 2008 05:40:22 -0000 @@ -152,7 +152,7 @@ class SimpleTestTestCase extends DrupalW * Fetch the test id from the test results. */ function getTestIdFromResults() { - foreach($this->results['assertions'] as $assertion) { + foreach ($this->results['assertions'] as $assertion) { if (preg_match('@^Test ID is ([0-9]*)\.$@', $assertion['message'], $matches)) { return $matches[1]; } Index: modules/simpletest/tests/common.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v retrieving revision 1.7 diff -u -p -r1.7 common.test --- modules/simpletest/tests/common.test 17 Sep 2008 07:01:31 -0000 1.7 +++ modules/simpletest/tests/common.test 12 Oct 2008 05:40:23 -0000 @@ -156,7 +156,7 @@ class DrupalHTTPRequestTestCase extends $password = $this->randomName(); $url = url('system-test/auth', array('absolute' => TRUE)); - $auth = str_replace('http://', 'http://' . $username . ':' . $password .'@', $url); + $auth = str_replace('http://', 'http://' . $username . ':' . $password . '@', $url); $result = drupal_http_request($auth); // We use strpos directly. Index: modules/simpletest/tests/database_test.install =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/database_test.install,v retrieving revision 1.3 diff -u -p -r1.3 database_test.install --- modules/simpletest/tests/database_test.install 8 Oct 2008 18:34:30 -0000 1.3 +++ modules/simpletest/tests/database_test.install 12 Oct 2008 05:40:23 -0000 @@ -30,7 +30,8 @@ function database_test_schema() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default' => 0), + 'default' => 0, + ), 'job' => array( 'description' => "The person's job", 'type' => 'varchar', @@ -59,7 +60,7 @@ function database_test_schema() { 'length' => 255, 'not null' => TRUE, 'default' => '', - ), + ), 'age' => array( 'description' => "The person's age", 'type' => 'int', @@ -104,7 +105,7 @@ function database_test_schema() { 'description' => 'Simple unique ID.', 'type' => 'serial', 'not null' => TRUE, - ), + ), 'blob1' => array( 'description' => 'A dummy BLOB field.', 'type' => 'blob', Index: modules/simpletest/tests/database_test.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/database_test.test,v retrieving revision 1.9 diff -u -p -r1.9 database_test.test --- modules/simpletest/tests/database_test.test 28 Sep 2008 21:52:08 -0000 1.9 +++ modules/simpletest/tests/database_test.test 12 Oct 2008 05:40:24 -0000 @@ -351,7 +351,7 @@ class DatabaseInsertTestCase extends Dat * Test that we can insert multiple records in one query object. */ function testMultiInsert() { - try { + try { $num_records_before = (int) db_query("SELECT COUNT(*) FROM {test}")->fetchField(); $query = db_insert('test'); @@ -379,7 +379,7 @@ class DatabaseInsertTestCase extends Dat $this->assertIdentical($saved_age, '31', t('Can retrieve by name.')); $saved_age = db_query("SELECT age FROM {test} WHERE name = :name", array(':name' => 'Moe'))->fetchField(); $this->assertIdentical($saved_age, '32', t('Can retrieve by name.')); - } + } catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } @@ -419,7 +419,7 @@ class DatabaseInsertTestCase extends Dat $this->assertIdentical($saved_age, '31', t('Can retrieve by name.')); $saved_age = db_query("SELECT age FROM {test} WHERE name = :name", array(':name' => 'Moe'))->fetchField(); $this->assertIdentical($saved_age, '32', t('Can retrieve by name.')); - } + } catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } @@ -453,7 +453,7 @@ class DatabaseInsertTestCase extends Dat ->execute(); $this->assertIdentical($id, '5', t('Auto-increment ID returned successfully.')); - } + } catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } @@ -851,7 +851,7 @@ class DatabaseMergeTestCase extends Data $this->assertEqual($person->age, 31, t('Age set correctly.')); $this->assertEqual($person->job, 'Presenter', t('Job set correctly.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -967,7 +967,7 @@ class DatabaseSelectTestCase extends Dat $this->assertEqual($num_records, 4, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1047,7 +1047,7 @@ class DatabaseSelectOrderedTestCase exte $this->assertEqual($num_records, 4, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1083,7 +1083,7 @@ class DatabaseSelectOrderedTestCase exte } $this->assertEqual($num_records, 4, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1110,7 +1110,7 @@ class DatabaseSelectOrderedTestCase exte $this->assertEqual($num_records, 4, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1154,7 +1154,7 @@ class DatabaseSelectComplexTestCase exte $this->assertEqual($num_records, 7, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1184,7 +1184,7 @@ class DatabaseSelectComplexTestCase exte $this->assertEqual($num_records, 8, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1225,7 +1225,7 @@ class DatabaseSelectComplexTestCase exte $this->assertEqual($num_records, 6, t('Returned the correct number of total rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1264,7 +1264,7 @@ class DatabaseSelectComplexTestCase exte $this->assertEqual($num_records, 1, t('Returned the correct number of total rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1287,7 +1287,7 @@ class DatabaseSelectComplexTestCase exte $this->assertEqual($num_records, 2, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1309,7 +1309,7 @@ class DatabaseSelectComplexTestCase exte $this->assertEqual($num_records, 6, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1334,7 +1334,7 @@ class DatabaseSelectComplexTestCase exte $this->assertEqual($record->$name_field, 'George', t('Correct data retrieved.')); $this->assertEqual($record->$age_field, 27, t('Correct data retrieved.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1370,7 +1370,7 @@ class DatabaseTaggingTestCase extends Da $this->assertTrue($query->hasTag('test'), t('hasTag() returned true.')); $this->assertFalse($query->hasTag('other'), t('hasTag() returned false.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1390,7 +1390,7 @@ class DatabaseTaggingTestCase extends Da $this->assertTrue($query->hasAllTags('test', 'other'), t('hasAllTags() returned true.')); $this->assertFalse($query->hasAllTags('test', 'stuff'), t('hasAllTags() returned false.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1409,7 +1409,7 @@ class DatabaseTaggingTestCase extends Da $this->assertTrue($query->hasAnyTag('test', 'other'), t('hasAnyTag() returned true.')); $this->assertFalse($query->hasAnyTag('other', 'stuff'), t('hasAnyTag() returned false.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1438,7 +1438,7 @@ class DatabaseTaggingTestCase extends Da $return = $query->getMetaData('nothere'); $this->assertNull($return, t('Non-existant key returned NULL.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1478,7 +1478,7 @@ class DatabaseAlterTestCase extends Data $this->assertEqual($num_records, 2, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1507,7 +1507,7 @@ class DatabaseAlterTestCase extends Data $this->assertEqual($records[1]->$tid_field, 5, t('Correct data retrieved.')); $this->assertEqual($records[1]->$task_field, 'sleep', t('Correct data retrieved.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1537,7 +1537,7 @@ class DatabaseAlterTestCase extends Data $this->assertEqual($records[0]->$pid_field, 1, t('Correct data retrieved.')); $this->assertEqual($records[0]->$task_field, 'sleep', t('Correct data retrieved.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1573,7 +1573,7 @@ class DatabaseAlter2TestCase extends Dat $this->assertEqual($record->$name_field, 'George', t('Correct data retrieved.')); $this->assertFalse(isset($record->$age_field), t('Age field not found, as intended.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1596,7 +1596,7 @@ class DatabaseAlter2TestCase extends Dat $this->assertEqual($record->$name_field, 'George', t('Fetched name is correct.')); $this->assertEqual($record->$age_field, 27*3, t('Fetched age expression is correct.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } @@ -1616,7 +1616,7 @@ class DatabaseAlter2TestCase extends Dat $this->assertEqual($num_records, 4, t('Returned the correct number of rows.')); } - catch(Exception $e) { + catch (Exception $e) { $this->assertTrue(FALSE, $e->getMessage()); } } Index: modules/simpletest/tests/file.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/file.test,v retrieving revision 1.6 diff -u -p -r1.6 file.test --- modules/simpletest/tests/file.test 9 Oct 2008 00:02:29 -0000 1.6 +++ modules/simpletest/tests/file.test 12 Oct 2008 05:40:25 -0000 @@ -426,12 +426,12 @@ class FileDirectoryTest extends FileTest $this->assertTrue(is_writeable($directory), t('Directory is writeable.'), 'File'); // Remove .htaccess file to then test that it gets re-created. - @unlink(file_directory_path() .'/.htaccess'); + @unlink(file_directory_path() . '/.htaccess'); file_check_directory(file_directory_path()); $this->assertTrue(is_file(file_directory_path() . '/.htaccess'), t('Successfully created the .htaccess file in the files directory.'), 'File'); // Verify contents of .htaccess file. - $file = file_get_contents(file_directory_path() .'/.htaccess'); + $file = file_get_contents(file_directory_path() . '/.htaccess'); $this->assertEqual($file, "SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006\nOptions None\nOptions +FollowSymLinks", t('The .htaccess file contains the proper content.'), 'File'); } @@ -493,14 +493,14 @@ class FileDirectoryTest extends FileTest // directory. $basename = 'xyz.txt'; $directory = 'misc'; - $original = $directory .'/'. $basename; + $original = $directory . '/' . $basename; $path = file_create_filename($basename, $directory); $this->assertEqual($path, $original, t('New filepath %new equals %original.', array('%new' => $path, '%original' => $original)), 'File'); // Then we test against a file that already exists within that directory. $basename = 'druplicon.png'; - $original = $directory .'/'. $basename; - $expected = $directory .'/druplicon_0.png'; + $original = $directory . '/' . $basename; + $expected = $directory . '/druplicon_0.png'; $path = file_create_filename($basename, $directory); $this->assertEqual($path, $expected, t('Creating a new filepath from %original equals %new.', array('%new' => $path, '%original' => $original)), 'File'); @@ -1135,4 +1135,5 @@ class FileSaveDataTest extends FileHookT $file = file_save_data($contents, 'asdf.txt', FILE_EXISTS_ERROR); $this->assertFalse($file, t("Overwriting a file fails when FILE_EXISTS_ERROR is specified.")); } -} \ No newline at end of file +} + Index: modules/simpletest/tests/hook_menu.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/hook_menu.module,v retrieving revision 1.1 diff -u -p -r1.1 hook_menu.module --- modules/simpletest/tests/hook_menu.module 2 Sep 2008 19:23:02 -0000 1.1 +++ modules/simpletest/tests/hook_menu.module 12 Oct 2008 05:40:25 -0000 @@ -6,7 +6,7 @@ * Dummy module implementing hook menu to test changing the menu name. */ - /** +/** * The name of the menu changes during the course of this test. Use a $_GET. */ function hook_menu_menu() { @@ -17,4 +17,5 @@ function hook_menu_menu() { 'menu_name' => isset($_GET["hook_menu_name"]) ? $_GET["hook_menu_name"] : 'original', ); return $items; -} \ No newline at end of file +} + Index: modules/simpletest/tests/xmlrpc.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/xmlrpc.test,v retrieving revision 1.4 diff -u -p -r1.4 xmlrpc.test --- modules/simpletest/tests/xmlrpc.test 17 Sep 2008 16:49:41 -0000 1.4 +++ modules/simpletest/tests/xmlrpc.test 12 Oct 2008 05:40:25 -0000 @@ -29,13 +29,15 @@ class XMLRPCValidator1IncTestCase extend mt_srand(); - $array_1 = array(array('curly' => mt_rand(-100,100)), - array('curly' => mt_rand(-100,100)), - array('larry' => mt_rand(-100,100)), - array('larry' => mt_rand(-100,100)), - array('moe' => mt_rand(-100,100)), - array('moe' => mt_rand(-100,100)), - array('larry' => mt_rand(-100,100))); + $array_1 = array( + array('curly' => mt_rand(-100,100)), + array('curly' => mt_rand(-100,100)), + array('larry' => mt_rand(-100,100)), + array('larry' => mt_rand(-100,100)), + array('moe' => mt_rand(-100,100)), + array('moe' => mt_rand(-100,100)), + array('larry' => mt_rand(-100,100)), + ); shuffle($array_1); $l_res_1 = xmlrpc_test_arrayOfStructsTest($array_1); $r_res_1 = xmlrpc($xml_url, 'validator1.arrayOfStructsTest', $array_1); Index: modules/simpletest/tests/xmlrpc_test.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/xmlrpc_test.module,v retrieving revision 1.2 diff -u -p -r1.2 xmlrpc_test.module --- modules/simpletest/tests/xmlrpc_test.module 17 Sep 2008 16:49:41 -0000 1.2 +++ modules/simpletest/tests/xmlrpc_test.module 12 Oct 2008 05:40:25 -0000 @@ -81,7 +81,7 @@ function xmlrpc_test_message_sized_in_kb $line['word_' . $i] = $word; } - for($i = 0; $i < $size; $i++) { + for ($i = 0; $i < $size; $i++) { $message['line_' . $i] = $line; } Index: modules/statistics/statistics.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v retrieving revision 1.12 diff -u -p -r1.12 statistics.admin.inc --- modules/statistics/statistics.admin.inc 11 Oct 2008 21:11:01 -0000 1.12 +++ modules/statistics/statistics.admin.inc 12 Oct 2008 05:40:25 -0000 @@ -118,7 +118,7 @@ function statistics_top_referrers() { ); $query .= tablesort_sql($header); - $result = pager_query($query, 30, 0, $query_cnt, array(':host' => '%'. $_SERVER['HTTP_HOST'] .'%')); + $result = pager_query($query, 30, 0, $query_cnt, array(':host' => '%' . $_SERVER['HTTP_HOST'] . '%')); $rows = array(); while ($referrer = db_fetch_object($result)) { Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.101 diff -u -p -r1.101 system.admin.inc --- modules/system/system.admin.inc 12 Oct 2008 04:30:08 -0000 1.101 +++ modules/system/system.admin.inc 12 Oct 2008 05:40:27 -0000 @@ -2092,15 +2092,15 @@ function theme_system_modules_fieldset($ // If we have help, it becomes the first part // of the description - with CSS, it is float: right'd. if (isset($module['help'])) { - $description = '
'. drupal_render($module['help']) .'
'; + $description = '
' . drupal_render($module['help']) . '
'; } // Add the description, along with any dependencies. $description .= drupal_render($module['description']); if ($module['#dependencies']) { - $description .= '
' . t('Depends on: ') . implode(', ', $module['#dependencies']) . '
'; + $description .= '
' . t('Depends on: ') . implode(', ', $module['#dependencies']) . '
'; } if ($module['#dependents']) { - $description .= '
' . t('Required by: ') . implode(', ', $module['#dependents']) . '
'; + $description .= '
' . t('Required by: ') . implode(', ', $module['#dependents']) . '
'; } $row[] = array('data' => $description, 'class' => 'description'); $rows[] = $row; @@ -2119,7 +2119,7 @@ function theme_system_modules_fieldset($ * An HTML string for the message. */ function theme_system_modules_incompatible($message) { - return '
'. $message .'
'; + return '
' . $message . '
'; } /** Index: modules/system/system.install =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.install,v retrieving revision 1.271 diff -u -p -r1.271 system.install --- modules/system/system.install 12 Oct 2008 04:30:08 -0000 1.271 +++ modules/system/system.install 12 Oct 2008 05:40:31 -0000 @@ -549,7 +549,7 @@ function system_schema() { $schema['blocked_ips'] = array( 'description' => t('Stores blocked IP addresses.'), 'fields' => array( - 'iid' => array( + 'iid' => array( 'description' => t('Primary Key: unique ID for IP addresses.'), 'type' => 'serial', 'unsigned' => TRUE, @@ -887,7 +887,7 @@ function system_schema() { $schema['menu_links'] = array( 'description' => t('Contains the individual links within a menu.'), 'fields' => array( - 'menu_name' => array( + 'menu_name' => array( 'description' => t("The menu name. All links with the same menu name (such as 'navigation') are part of the same menu."), 'type' => 'varchar', 'length' => 32, @@ -3066,7 +3066,7 @@ function system_update_7011() { 'permission' => 'bypass node access', )); } - $insert->execute(); + $insert->execute(); return $ret; } @@ -3074,4 +3074,3 @@ function system_update_7011() { * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ - Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.629 diff -u -p -r1.629 system.module --- modules/system/system.module 11 Oct 2008 21:11:01 -0000 1.629 +++ modules/system/system.module 12 Oct 2008 05:40:31 -0000 @@ -770,7 +770,7 @@ function system_block($op = 'list', $del $blocks['powered-by'] = array( 'info' => t('Powered by Drupal'), 'weight' => '10', - // Not worth caching. + // Not worth caching. 'cache' => BLOCK_NO_CACHE, ); return $blocks; @@ -1383,8 +1383,8 @@ function system_get_module_admin_tasks($ if (!isset($items)) { $result = db_query(" - SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, ml.* - FROM {menu_links} ml INNER JOIN {menu_router} m ON ml.router_path = m.path WHERE ml.link_path LIKE 'admin/%' AND hidden >= 0 AND module = 'system' AND m.number_parts > 2"); + SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, ml.* + FROM {menu_links} ml INNER JOIN {menu_router} m ON ml.router_path = m.path WHERE ml.link_path LIKE 'admin/%' AND hidden >= 0 AND module = 'system' AND m.number_parts > 2"); $items = array(); while ($item = db_fetch_array($result)) { _menu_link_translate($item); Index: modules/system/system.test =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.test,v retrieving revision 1.18 diff -u -p -r1.18 system.test --- modules/system/system.test 11 Oct 2008 22:46:22 -0000 1.18 +++ modules/system/system.test 12 Oct 2008 05:40:31 -0000 @@ -104,7 +104,7 @@ class EnableDisableCoreTestCase extends function testDisableRequired() { $required_modules = drupal_required_modules(); $this->drupalGet('admin/build/modules'); - foreach($required_modules as $module) { + foreach ($required_modules as $module) { // Check to make sure the checkbox for required module is not found. $this->assertNoFieldByName('modules[Core][' . $module . '][enable]'); } @@ -210,11 +210,11 @@ class IPAddressBlockingTestCase extends $this->assertText(t('Please enter a valid IP address.')); // Submit your own IP address. This fails, although it works when testing manually. - // TODO: on some systems this test fails due to a bug or inconsistency in cURL. - // $edit = array(); - // $edit['ip'] = ip_address(); - // $this->drupalPost('admin/settings/ip-blocking', $edit, t('Save')); - // $this->assertText(t('You may not block your own IP address.')); + // TODO: on some systems this test fails due to a bug or inconsistency in cURL. + // $edit = array(); + // $edit['ip'] = ip_address(); + // $this->drupalPost('admin/settings/ip-blocking', $edit, t('Save')); + // $this->assertText(t('You may not block your own IP address.')); } } @@ -519,8 +519,8 @@ class PageTitleFiltering extends DrupalW $this->assertTrue(strpos(drupal_get_title(), '') !== FALSE, t('Tags in title are not converted to entities when $output is PASS_THROUGH.')); // Generate node content. $edit = array( - 'title' => '!SimpleTest! ' . $title . $this->randomName(20), - 'body' => '!SimpleTest! test body' . $this->randomName(200), + 'title' => '!SimpleTest! ' . $title . $this->randomName(20), + 'body' => '!SimpleTest! test body' . $this->randomName(200), ); // Create the node with HTML in the title. $this->drupalPost('node/add/page', $edit, t('Save')); @@ -531,4 +531,3 @@ class PageTitleFiltering extends DrupalW $this->assertText(check_plain($edit['title']), 'Check to make sure tags in the node title are converted.'); } } - Index: modules/taxonomy/taxonomy.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.pages.inc,v retrieving revision 1.16 diff -u -p -r1.16 taxonomy.pages.inc --- modules/taxonomy/taxonomy.pages.inc 11 Oct 2008 21:11:01 -0000 1.16 +++ modules/taxonomy/taxonomy.pages.inc 12 Oct 2008 05:40:31 -0000 @@ -131,7 +131,7 @@ function taxonomy_autocomplete($vid, $st 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, - ':last_string' => '%'. $last_string .'%', + ':last_string' => '%' . $last_string . '%', ), 0, 10); $prefix = count($array) ? implode(', ', $array) . ', ' : ''; Index: modules/taxonomy/taxonomy.test =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.test,v retrieving revision 1.8 diff -u -p -r1.8 taxonomy.test --- modules/taxonomy/taxonomy.test 24 Sep 2008 18:42:00 -0000 1.8 +++ modules/taxonomy/taxonomy.test 12 Oct 2008 05:40:32 -0000 @@ -5,13 +5,13 @@ class TaxonomyVocabularyLoadTestCase ext /** * Implementation of getInfo(). */ - function getInfo() { - return array( - 'name' => t('Loading taxonomy vocabularies'), - 'description' => t('Test loading vocabularies under various conditions.'), - 'group' => t('Taxonomy'), - ); - } + function getInfo() { + return array( + 'name' => t('Loading taxonomy vocabularies'), + 'description' => t('Test loading vocabularies under various conditions.'), + 'group' => t('Taxonomy'), + ); + } /** * Implementation of setUp() { @@ -109,14 +109,14 @@ class TaxonomyVocabularyFunctionsTestCas $nodesList = array_keys(node_get_types()); $maxNodes = rand(1, count($nodesList)); $nodes = array(); - for($i = 0; $i < $maxNodes; $i++) { + for ($i = 0; $i < $maxNodes; $i++) { $nodes[$nodesList[$i]] = $nodesList[$i]; $nodesBak[$nodesList[$i]] = $nodesList[$i]; } $_t = array('vid', 'name', 'description', 'help', 'relations', 'hierarchy', 'multiple', 'required', 'tags', 'module', 'weight', 'nodes'); $edit = array(); - foreach($_t as $key) + foreach ($_t as $key) $edit[$key] = $$key; // Exec save function. @@ -125,7 +125,7 @@ class TaxonomyVocabularyFunctionsTestCas ksort($nodesBak); $edit['nodes'] = $nodesBak; $vocabularies = taxonomy_get_vocabularies(); - foreach($vocabularies as $voc) { + foreach ($vocabularies as $voc) { if ($voc->name == $name) { $vid = $voc->vid; break; @@ -134,13 +134,13 @@ class TaxonomyVocabularyFunctionsTestCas $edit['vid'] = $vid; // Get data using function. $getEdit = taxonomy_vocabulary_load($vid); - foreach($getEdit as $key => $value ) { + foreach ($getEdit as $key => $value ) { $this->assertEqual($value, $edit[$key], t('Checking value of @key.', array('@key' => $key))); } // Delete vocabulary to avoid exception messages we create array with empty fields. $deleteArray = array(); - foreach($getEdit as $key => $v) { + foreach ($getEdit as $key => $v) { $deleteArray[$key] = 0; } $deleteArray['vid'] = $vid; @@ -148,7 +148,7 @@ class TaxonomyVocabularyFunctionsTestCas // Checking if we deleted voc. $vocabularies = taxonomy_get_vocabularies(); $vid = 0; - foreach($vocabularies as $voc) { + foreach ($vocabularies as $voc) { if ($voc->name == $name) { $vid = $voc->vid; break; @@ -178,7 +178,7 @@ class TaxonomyTermFunctionsTestCase exte $edit = array(); $_t = array('vid', 'name', 'description', 'help', 'relations', 'hierarchy', 'multiple', 'required', 'tags', 'module', 'weight', 'nodes'); - foreach($_t as $key ) { + foreach ($_t as $key ) { $edit[$key] = 0; } $name = $this->randomName(20); @@ -192,7 +192,7 @@ class TaxonomyTermFunctionsTestCase exte $termweight = rand(-9, 9); $randSyn = rand(0, 9); $synonyms = array(); - for($i = 0; $i < $randSyn; $i++) { + for ($i = 0; $i < $randSyn; $i++) { $synonyms[] = $this->randomName(20); } $termsyn = implode("\n", $synonyms); @@ -203,7 +203,7 @@ class TaxonomyTermFunctionsTestCase exte $_tArray = taxonomy_get_term_by_name($termname); $getTerm = $_tArray[0]; $checkField = array('name', 'description', 'weight', 'vid'); - foreach($checkField as $v) { + foreach ($checkField as $v) { $this->assertEqual($data[$v], $getTerm->$v, t('Checking value of the term (@v).', array('@v' => $v))); } $getSynonyms = taxonomy_get_synonyms($getTerm->tid); @@ -229,7 +229,7 @@ class TaxonomyTermFunctionsTestCase exte // Check related terms. $related = taxonomy_get_related($getTerm->tid); - foreach($relations as $rTid) { + foreach ($relations as $rTid) { $this->assertTrue(array_key_exists($rTid, $related), t('Checking relations (@rTid).', array('@rTid' => $rTid))); } @@ -260,7 +260,7 @@ class TaxonomyTermSingleTestCase extends $edit = array(); $_t = array('vid', 'name', 'description', 'help', 'relations', 'hierarchy', 'multiple', 'required', 'tags', 'module', 'weight', 'nodes'); - foreach($_t as $key ) { + foreach ($_t as $key ) { $edit[$key] = 0; } @@ -317,7 +317,7 @@ class TaxonomyTermMultipleTestCase exten $edit = array(); $_t = array('vid', 'name', 'description', 'help', 'relations', 'hierarchy', 'multiple', 'required', 'tags', 'module', 'weight', 'nodes'); - foreach($_t as $key ) + foreach ($_t as $key ) $edit[$key] = 0; $name = $this->randomName(20); @@ -348,7 +348,7 @@ class TaxonomyTermMultipleTestCase exten $children = $_tArray[0]; $getParent = taxonomy_get_parents($children->tid); - foreach($parent as $p) { + foreach ($parent as $p) { $this->assertTrue(array_key_exists($p, $getParent), t('Checking parents (@p)', array('@p' => $p))); //$this->assertEqual($parent,$getParent[$parent->tid], 'Checking parents'); } @@ -418,7 +418,7 @@ class TaxonomyTestNodeApiTestCase extend $edit = array(); $_t = array('vid', 'name', 'description', 'help', 'relations', 'hierarchy', 'multiple', 'required', 'tags', 'module', 'weight', 'nodes'); - foreach($_t as $key) { + foreach ($_t as $key) { $edit[$key] = 0; } @@ -469,7 +469,7 @@ class TaxonomyTestNodeApiTestCase extend $node = node_load(array('title' => $title)); $this->drupalGet("node/$node->nid"); - foreach($patternArray as $name => $termPattern) { + foreach ($patternArray as $name => $termPattern) { $this->assertText($termPattern, "Checking $name"); } @@ -504,7 +504,7 @@ class TaxonomyTestNodeApiTestCase extend // TODO Do a MUCH better check here of the information msg. $patternArray['information message'] = 'been updated'; - foreach($patternArray as $name => $termPattern) { + foreach ($patternArray as $name => $termPattern) { $this->assertText($termPattern, t('Checking @name.', array('@name' => $name))); } @@ -526,7 +526,7 @@ class TaxonomyTestNodeApiTestCase extend // Delete vocabulary to avoid exception messages create array with empty fields. $edit = array(); - foreach($_t as $key ) { + foreach ($_t as $key ) { $edit[$key] = 0; } $edit['name'] = 0; @@ -546,8 +546,7 @@ class TermEditTestCase extends DrupalWeb function getInfo() { return array( 'name' => 'Term edit test', - 'description' => t('Ensure terms can be edited from administration page - and that term name and description are saved.'), + 'description' => t('Ensure terms can be edited from administration page and that term name and description are saved.'), 'group' => t('Taxonomy')); } Index: modules/translation/translation.module =================================================================== RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v retrieving revision 1.33 diff -u -p -r1.33 translation.module --- modules/translation/translation.module 9 Oct 2008 18:32:47 -0000 1.33 +++ modules/translation/translation.module 12 Oct 2008 05:40:32 -0000 @@ -251,7 +251,7 @@ function translation_nodeapi_delete(&$no translation_remove_from_set($node); } } - + /** * Remove a node from its translation set (if any) * and update the set accordingly. Index: modules/trigger/trigger.module =================================================================== RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v retrieving revision 1.20 diff -u -p -r1.20 trigger.module --- modules/trigger/trigger.module 6 Oct 2008 12:55:56 -0000 1.20 +++ modules/trigger/trigger.module 12 Oct 2008 05:40:32 -0000 @@ -202,7 +202,7 @@ function _trigger_normalize_node_context /** * Simple wrapper function to make user hooks work with new entry points. * - * @TODO: Take advantage of the new API and reorganise/remove this function. + * @TODO: Take advantage of the new API and reorganise/remove this function. */ function _trigger_nodeapi(&$node, $op, $a3, $a4) { // Keep objects for reuse so that changes actions make to objects can persist. @@ -241,7 +241,7 @@ function _trigger_nodeapi(&$node, $op, $ } } } - + /** * Implementation of hook_nodeapi_view(). */ @@ -384,51 +384,51 @@ function _trigger_normalize_user_context } /** - * trigger_user_login + * trigger_user_login */ function trigger_user_login(&$edit, &$account, $category) { - _trigger_user('login', $edit, $account, $category); + _trigger_user('login', $edit, $account, $category); } /** * Implementation of hook_user_logout(). */ function trigger_user_logout(&$edit, &$account, $category) { - _trigger_user('logout', $edit, $account, $category); + _trigger_user('logout', $edit, $account, $category); } /** * Implementation of hook_user_insert(). */ function trigger_user_insert(&$edit, &$account, $category) { - _trigger_user('insert', $edit, $account, $category); + _trigger_user('insert', $edit, $account, $category); } /** * Implementation of hook_user_update(). */ function trigger_user_update(&$edit, &$account, $category) { - _trigger_user('update', $edit, $account, $category); + _trigger_user('update', $edit, $account, $category); } /** * Implementation of hook_user_delete(). */ function trigger_user_delete(&$edit, &$account, $category) { - _trigger_user('delete', $edit, $account, $category); + _trigger_user('delete', $edit, $account, $category); } /** * Implementation of hook_user_view(). */ function trigger_user_view(&$edit, &$account, $category) { - _trigger_user('view', $edit, $account, $category); + _trigger_user('view', $edit, $account, $category); } /** * Simple wrapper function to make user hooks work with new entry points. * - * @TODO: Take advantage of the new API and reorganise/remove this function. + * @TODO: Take advantage of the new API and reorganise/remove this function. */ function _trigger_user($op, &$edit, &$account, $category = NULL) { // Keep objects for reuse so that changes actions make to objects can persist. Index: modules/upload/upload.module =================================================================== RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v retrieving revision 1.213 diff -u -p -r1.213 upload.module --- modules/upload/upload.module 12 Oct 2008 02:42:56 -0000 1.213 +++ modules/upload/upload.module 12 Oct 2008 05:40:33 -0000 @@ -355,7 +355,7 @@ function upload_nodeapi_delete(&$node, $ if (!is_array($node->files)) { return; } - foreach($node->files as $file) { + foreach ($node->files as $file) { file_delete($file); } } Index: modules/upload/upload.test =================================================================== RCS file: /cvs/drupal/drupal/modules/upload/upload.test,v retrieving revision 1.5 diff -u -p -r1.5 upload.test --- modules/upload/upload.test 9 Oct 2008 00:02:29 -0000 1.5 +++ modules/upload/upload.test 12 Oct 2008 05:40:33 -0000 @@ -118,7 +118,7 @@ class UploadTestCase extends DrupalWebTe // extension. $html_file = $html_files[1]->filename; $this->uploadFile($node, $html_file); - $this->assertNoRaw(t('The specified file %name could not be uploaded.', array('%name' => basename($html_file))), t('File '. $html_file . ' was allowed to be uploaded')); + $this->assertNoRaw(t('The specified file %name could not be uploaded.', array('%name' => basename($html_file))), t('File ' . $html_file . ' was allowed to be uploaded')); } /** Index: modules/user/user-profile.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user-profile.tpl.php,v retrieving revision 1.2 diff -u -p -r1.2 user-profile.tpl.php --- modules/user/user-profile.tpl.php 7 Aug 2007 08:39:36 -0000 1.2 +++ modules/user/user-profile.tpl.php 12 Oct 2008 05:40:33 -0000 @@ -26,7 +26,7 @@ * * To check for all available data within $profile, use the code below. * - * '. check_plain(print_r($profile, 1)) .''; ?> + * ' . check_plain(print_r($profile, 1)) . ''; ?> * * @see user-profile-category.tpl.php * where the html is handled for the group. Index: modules/user/user.install =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.install,v retrieving revision 1.13 diff -u -p -r1.13 user.install --- modules/user/user.install 20 Sep 2008 20:22:25 -0000 1.13 +++ modules/user/user.install 12 Oct 2008 05:40:33 -0000 @@ -258,13 +258,13 @@ function user_update_7000(&$sandbox) { $count = 1000; $result = db_query_range("SELECT uid, pass FROM {users} WHERE uid > 0 ORDER BY uid", $sandbox['user_from'], $count); while ($account = db_fetch_array($result)) { - $has_rows = TRUE; - $new_hash = user_hash_password($account['pass'], $hash_count_log2); - if ($new_hash) { - // Indicate an updated password. - $new_hash = 'U' . $new_hash; - db_query("UPDATE {users} SET pass = '%s' WHERE uid = %d", $new_hash, $account['uid']); - } + $has_rows = TRUE; + $new_hash = user_hash_password($account['pass'], $hash_count_log2); + if ($new_hash) { + // Indicate an updated password. + $new_hash = 'U' . $new_hash; + db_query("UPDATE {users} SET pass = '%s' WHERE uid = %d", $new_hash, $account['uid']); + } } $ret['#finished'] = $sandbox['user_from']/$sandbox['user_count']; $sandbox['user_from'] += $count; @@ -295,4 +295,3 @@ function user_update_7001() { * @} End of "defgroup user-updates-6.x-to-7.x" * The next series of updates should start at 8000. */ - Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.928 diff -u -p -r1.928 user.module --- modules/user/user.module 12 Oct 2008 04:30:09 -0000 1.928 +++ modules/user/user.module 12 Oct 2008 05:40:35 -0000 @@ -570,24 +570,24 @@ function user_is_blocked($name) { * Implementation of hook_perm(). */ function user_perm() { - return array( - 'administer permissions' => array( - 'title' => t('Administer permissions'), - 'description' => t('Manage the permissions assigned to user roles. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), - ), - 'administer users' => array( - 'title' => t('Administer users'), - 'description' => t('Manage or block users, and manage their role assignments.'), - ), - 'access user profiles' => array( - 'title' => t('Access user profiles'), - 'description' => t('View profiles of users on the site, which may contain personal information.'), - ), - 'change own username' => array( - 'title' => t('Change own username'), - 'description' => t('Select a different username.'), - ), - ); + return array( + 'administer permissions' => array( + 'title' => t('Administer permissions'), + 'description' => t('Manage the permissions assigned to user roles. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + ), + 'administer users' => array( + 'title' => t('Administer users'), + 'description' => t('Manage or block users, and manage their role assignments.'), + ), + 'access user profiles' => array( + 'title' => t('Access user profiles'), + 'description' => t('View profiles of users on the site, which may contain personal information.'), + ), + 'change own username' => array( + 'title' => t('Change own username'), + 'description' => t('Select a different username.'), + ), + ); } /** @@ -1345,10 +1345,10 @@ function user_authenticate($form_values require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc'); if (user_check_password($password, $account)) { if (user_needs_new_hash($account)) { - $new_hash = user_hash_password($password); - if ($new_hash) { - db_query("UPDATE {users} SET pass = '%s' WHERE uid = %d", $new_hash, $account->uid); - } + $new_hash = user_hash_password($password); + if ($new_hash) { + db_query("UPDATE {users} SET pass = '%s' WHERE uid = %d", $new_hash, $account->uid); + } } $account = user_load(array('uid' => $account->uid, 'status' => 1)); $user = $account; @@ -2004,10 +2004,11 @@ function user_build_filter_query() { $where = !empty($where) ? 'AND ' . implode(' AND ', $where) : ''; $join = !empty($join) ? ' ' . implode(' ', array_unique($join)) : ''; - return array('where' => $where, - 'join' => $join, - 'args' => $args, - ); + return array( + 'where' => $where, + 'join' => $join, + 'args' => $args, + ); } /** @@ -2379,8 +2380,8 @@ function user_register() { $form = array_merge($form, user_edit_form($form_state, NULL, NULL, TRUE)); if ($admin) { $form['account']['notify'] = array( - '#type' => 'checkbox', - '#title' => t('Notify user of new account') + '#type' => 'checkbox', + '#title' => t('Notify user of new account') ); // Redirect back to page which initiated the create request; // usually admin/user/user/create. @@ -2447,4 +2448,3 @@ function _user_forms(&$edit, $account, $ return empty($groups) ? FALSE : $groups; } - Index: modules/user/user.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v retrieving revision 1.20 diff -u -p -r1.20 user.pages.inc --- modules/user/user.pages.inc 12 Oct 2008 04:30:09 -0000 1.20 +++ modules/user/user.pages.inc 12 Oct 2008 05:40:35 -0000 @@ -12,7 +12,7 @@ function user_autocomplete($string = '') { $matches = array(); if ($string) { - $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:name)", array(':name' => $string .'%'), 0, 10); + $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:name)", array(':name' => $string . '%'), 0, 10); while ($user = db_fetch_object($result)) { $matches[$user->name] = check_plain($user->name); } Index: modules/user/user.test =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.test,v retrieving revision 1.17 diff -u -p -r1.17 user.test --- modules/user/user.test 10 Oct 2008 07:49:49 -0000 1.17 +++ modules/user/user.test 12 Oct 2008 05:40:36 -0000 @@ -138,7 +138,7 @@ class UserValidationTestCase extends Dru foreach ($test_cases as $name => $test_case) { list($description, $test) = $test_case; $result = user_validate_name($name); - $this->$test($result, $description . ' ('. $name . ')'); + $this->$test($result, $description . ' (' . $name . ')'); } } @@ -226,7 +226,7 @@ class UserPictureTestCase extends Drupal $file_check = file_check_directory($file_dir, FILE_CREATE_DIRECTORY, 'file_directory_path'); $picture_dir = variable_get('user_picture_path', 'pictures'); - $picture_path = $file_dir .'/'.$picture_dir; + $picture_path = $file_dir . '/' . $picture_dir; $pic_check = file_check_directory($picture_path, FILE_CREATE_DIRECTORY, 'user_picture_path'); $this->_directory_test = is_writable($picture_path); @@ -316,7 +316,7 @@ class UserPictureTestCase extends Drupal * * results: The image shouldn't be uploaded */ - function testWithoutGDinvalidDimension() { + function testWithoutGDinvalidDimension() { if ($this->_directory_test) if (!image_get_toolkit()) { @@ -341,7 +341,7 @@ class UserPictureTestCase extends Drupal // Check if file is not uploaded. $this->assertFalse(is_file($pic_path), t('File was not uploaded.')); } - } + } /** * Do the test: @@ -350,7 +350,7 @@ class UserPictureTestCase extends Drupal * * results: The image shouldn't be uploaded */ - function testWithoutGDinvalidSize() { + function testWithoutGDinvalidSize() { if ($this->_directory_test) if (!image_get_toolkit()) { $this->drupalLogin($this->user); @@ -517,7 +517,7 @@ class UserAdminTestCase extends DrupalWe $this->assertEqual($account->status, 1, 'User B not blocked'); $edit = array(); $edit['operation'] = 'block'; - $edit['accounts['. $account->uid .']'] = TRUE; + $edit['accounts[' . $account->uid . ']'] = TRUE; $this->drupalPost('admin/user/user', $edit, t('Update')); $account = user_load(array('name' => $user_b->name)); $this->assertEqual($account->status, 0, 'User B blocked'); Index: scripts/password-hash.sh =================================================================== RCS file: /cvs/drupal/drupal/scripts/password-hash.sh,v retrieving revision 1.2 diff -u -p -r1.2 password-hash.sh --- scripts/password-hash.sh 20 Sep 2008 20:22:25 -0000 1.2 +++ scripts/password-hash.sh 12 Oct 2008 05:40:36 -0000 @@ -89,7 +89,6 @@ include_once DRUPAL_ROOT . '/includes/pa include_once DRUPAL_ROOT . '/includes/common.inc'; foreach ($passwords as $password) { - print("\npassword: $password \t\thash: ". user_hash_password($password) ."\n"); + print("\npassword: $password \t\thash: " . user_hash_password($password) . "\n"); } print("\n"); - Index: scripts/run-tests.sh =================================================================== RCS file: /cvs/drupal/drupal/scripts/run-tests.sh,v retrieving revision 1.13 diff -u -p -r1.13 run-tests.sh --- scripts/run-tests.sh 12 Oct 2008 04:30:09 -0000 1.13 +++ scripts/run-tests.sh 12 Oct 2008 05:40:36 -0000 @@ -37,7 +37,7 @@ if ($args['clean']) { // Get the status messages and print them. $messages = array_pop(drupal_get_messages('status')); - foreach($messages as $text) { + foreach ($messages as $text) { echo " - " . $text . "\n"; } exit; @@ -111,19 +111,19 @@ All arguments are long options. --url Immediately preceeds a URL to set the host and path. You will need this parameter if Drupal is in a subdirectory on your localhost and you have not set \$base_url in settings.php. - + --php The absolute path to the PHP executable. Usually not needed. --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'). @@ -258,10 +258,10 @@ function simpletest_script_init() { $_SERVER['SERVER_ADDR'] = '127.0.0.1'; $_SERVER['SERVER_SOFTWARE'] = 'Apache'; $_SERVER['SERVER_NAME'] = 'localhost'; - $_SERVER['REQUEST_URI'] = $path .'/'; + $_SERVER['REQUEST_URI'] = $path . '/'; $_SERVER['REQUEST_METHOD'] = 'GET'; - $_SERVER['SCRIPT_NAME'] = $path .'/index.php'; - $_SERVER['PHP_SELF'] = $path .'/index.php'; + $_SERVER['SCRIPT_NAME'] = $path . '/index.php'; + $_SERVER['PHP_SELF'] = $path . '/index.php'; $_SERVER['HTTP_USER_AGENT'] = 'Drupal command line'; chdir(realpath(dirname(__FILE__) . '/..')); @@ -391,7 +391,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); @@ -405,7 +405,7 @@ function simpletest_script_get_test_list // Check for valid group names and get all valid classes in group. foreach ($args['test_names'] as $group_name) { if (isset($groups[$group_name])) { - foreach($groups[$group_name] as $class_name => $instance) { + foreach ($groups[$group_name] as $class_name => $instance) { $test_list[] = $class_name; } } @@ -478,7 +478,7 @@ function simpletest_script_reporter_disp $results = db_query("SELECT * FROM {simpletest} WHERE test_id = %d ORDER BY test_class, message_id", $test_id); $test_class = ''; - while($result = db_fetch_object($results)) { + while ($result = db_fetch_object($results)) { if (isset($results_map[$result->status])) { if ($result->test_class != $test_class) { // Display test class every time results are for new test class. Index: sites/default/default.settings.php =================================================================== RCS file: /cvs/drupal/drupal/sites/default/default.settings.php,v retrieving revision 1.15 diff -u -p -r1.15 default.settings.php --- sites/default/default.settings.php 6 Oct 2008 10:54:15 -0000 1.15 +++ sites/default/default.settings.php 12 Oct 2008 05:40:36 -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. @@ -63,7 +63,7 @@ * 'port' => 3306, * ); * - * 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 @@ -80,7 +80,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: Index: themes/garland/template.php =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/template.php,v retrieving revision 1.19 diff -u -p -r1.19 template.php --- themes/garland/template.php 25 Jun 2008 09:12:25 -0000 1.19 +++ themes/garland/template.php 12 Oct 2008 05:40:37 -0000 @@ -45,7 +45,7 @@ function garland_preprocess_page(&$vars) } $vars['site_title'] = implode(' ', $site_fields); if (!empty($site_fields)) { - $site_fields[0] = ''. $site_fields[0] .''; + $site_fields[0] = '' . $site_fields[0] . ''; } $vars['site_html'] = implode(' ', $site_fields); @@ -91,9 +91,9 @@ function garland_node_submitted($node) { function garland_get_ie_styles() { global $language; - $ie_styles = ''. "\n"; + $ie_styles = '' . "\n"; if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) { - $ie_styles .= ' '. "\n"; + $ie_styles .= ' ' . "\n"; } return $ie_styles;