diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt index 769f3cf..5661d0c 100644 --- a/MAINTAINERS.txt +++ b/MAINTAINERS.txt @@ -1,5 +1,5 @@ -Drupal core is maintained by the community. To participate, go to +Drupal core is maintained by the community. To participate, go to http://drupal.org/contribute diff --git a/authorize.php b/authorize.php index 97cdd70..5c20657 100644 --- a/authorize.php +++ b/authorize.php @@ -145,7 +145,7 @@ if (authorize_access_allowed()) { l(t('Front page'), ''), )); } - + $output .= theme('item_list', array('items' => $links, 'title' => t('Next steps'))); } // If a batch is running, let it run. diff --git a/includes/ajax.inc b/includes/ajax.inc index ac1bd4c..78ea94b 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -101,7 +101,7 @@ * In the above example, the 'changethis' element is Ajax-enabled. The default * #ajax['event'] is 'change', so when the 'changethis' element changes, * an Ajax call is made. The form is submitted and reprocessed, and then the - * callback is called. In this case, the form has been automatically + * callback is called. In this case, the form has been automatically * built changing $form['replace_textfield']['#description'], so the callback * just returns that part of the form. * diff --git a/includes/archiver.inc b/includes/archiver.inc index fec053b..b35757f 100644 --- a/includes/archiver.inc +++ b/includes/archiver.inc @@ -15,7 +15,7 @@ interface ArchiverInterface { * * @param $file_path * The full system path of the archive to manipulate. Only local files - * are supported. If the file does not yet exist, it will be created if + * are supported. If the file does not yet exist, it will be created if * appropriate. */ public function __construct($file_path); diff --git a/includes/authorize.inc b/includes/authorize.inc index 3617d7d..f53cb60 100644 --- a/includes/authorize.inc +++ b/includes/authorize.inc @@ -210,7 +210,7 @@ function authorize_filetransfer_form_validate($form, &$form_state) { // The format of this error message is similar to that used on the // database connection form in the installer. form_set_error('connection_settings', t('Failed to connect to the server. The server reports the following message: !message For more help installing or updating code on your server, see the handbook.', array( - '!message' => '

' . $e->getMessage() . '

', + '!message' => '

' . $e->getMessage() . '

', '@handbook_url' => 'http://drupal.org/documentation/install/modules-themes', ))); } diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 17c8e83..a7dd1c1 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1596,7 +1596,7 @@ function drupal_block_denied($ip) { * @param $count * The number of characters (bytes) to return in the string. */ -function drupal_random_bytes($count) { +function drupal_random_bytes($count) { // $random_state does not use drupal_static as it stores random bytes. static $random_state, $bytes; // Initialize on the first call. The contents of $_SERVER includes a mix of @@ -2096,7 +2096,7 @@ function drupal_valid_test_ua() { if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^(simpletest\d+);(.+);(.+);(.+)$/", $_SERVER['HTTP_USER_AGENT'], $matches)) { list(, $prefix, $time, $salt, $hmac) = $matches; - $check_string = $prefix . ';' . $time . ';' . $salt; + $check_string = $prefix . ';' . $time . ';' . $salt; // We use the salt from settings.php to make the HMAC key, since // the database is not yet initialized and we can't access any Drupal variables. // The file properties add more entropy not easily accessible to others. diff --git a/includes/cache.inc b/includes/cache.inc index 8666874..34e616c 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -153,7 +153,7 @@ function cache_set($cid, $data, $bin = 'cache', $expire = CACHE_PERMANENT) { * * @param $wildcard * If $wildcard is TRUE, cache IDs starting with $cid are deleted in - * addition to the exact cache ID specified by $cid. If $wildcard is + * addition to the exact cache ID specified by $cid. If $wildcard is * TRUE and $cid is '*' then the entire bin $bin is emptied. */ function cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE) { diff --git a/includes/common.inc b/includes/common.inc index 4ec37dc..2f10166 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2750,7 +2750,7 @@ function drupal_add_html_head_link($attributes, $header = FALSE) { * drupal_get_css() where the overrides are performed. Also, if the * direction of the current language is right-to-left (Hebrew, Arabic, * etc.), the function will also look for an RTL CSS file and append it to - * the list. The name of this file should have an '-rtl.css' suffix. For + * the list. The name of this file should have an '-rtl.css' suffix. For * example a CSS file called 'mymodule-name.css' will have a * 'mymodule-name-rtl.css' file added to the list, if exists in the same * directory. This CSS file should contain overrides for properties which @@ -3594,12 +3594,12 @@ function _drupal_load_stylesheet($matches) { $directory = dirname($filename); // If the file is in the current directory, make sure '.' doesn't appear in // the url() path. - $directory = $directory == '.' ? '' : $directory .'/'; + $directory = $directory == '.' ? '' : $directory . '/'; // Alter all internal url() paths. Leave external paths alone. We don't need // to normalize absolute paths here (i.e. remove folder/... segments) because // that will be done later. - return preg_replace('/url\(\s*([\'"]?)(?![a-z]+:|\/+)/i', 'url(\1'. $directory, $file); + return preg_replace('/url\(\s*([\'"]?)(?![a-z]+:|\/+)/i', 'url(\1' . $directory, $file); } /** @@ -4138,7 +4138,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS ), ); foreach ($items as $item) { - $query_string = empty($item['version']) ? $default_query_string : $js_version_string . $item['version']; + $query_string = empty($item['version']) ? $default_query_string : $js_version_string . $item['version']; switch ($item['type']) { case 'setting': @@ -4230,7 +4230,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS * ); * @endcode * - * 'js', 'css', and 'library' are types that get special handling. For any + * 'js', 'css', and 'library' are types that get special handling. For any * other kind of attached data, the array key must be the full name of the * callback function and each value an array of arguments. For example: * @code diff --git a/includes/database/database.inc b/includes/database/database.inc index 4cc1a33..6f3bcf6 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -121,7 +121,7 @@ * databases that do not support transactions. To start a new transaction, * simply call $txn = db_transaction(); in your own code. The transaction will * remain open for as long as the variable $txn remains in scope. When $txn is - * destroyed, the transaction will be committed. If your transaction is nested + * destroyed, the transaction will be committed. If your transaction is nested * inside of another then Drupal will track each transaction and only commit * the outer-most transaction when the last transaction object goes out out of * scope, that is, all relevant queries completed successfully. @@ -194,7 +194,7 @@ abstract class DatabaseConnection extends PDO { /** * The key representing this connection. - * + * * The key is a unique string which identifies a database connection. A * connection can be a single server or a cluster of master and slaves (use * target to pick between master and slave). @@ -213,7 +213,7 @@ abstract class DatabaseConnection extends PDO { /** * Tracks the number of "layers" of transactions currently active. * - * On many databases transactions cannot nest. Instead, we track + * On many databases transactions cannot nest. Instead, we track * nested calls to transactions and collapse them into a single * transaction. * @@ -706,7 +706,7 @@ abstract class DatabaseConnection extends PDO { $new_keys = array(); foreach ($data as $i => $value) { // This assumes that there are no other placeholders that use the same - // name. For example, if the array placeholder is defined as :example + // name. For example, if the array placeholder is defined as :example // and there is already an :example_2 placeholder, this will generate // a duplicate key. We do not account for that as the calling code // is already broken if that happens. @@ -1076,7 +1076,7 @@ abstract class DatabaseConnection extends PDO { } // Commit everything since SAVEPOINT $name. - while($savepoint = array_pop($this->transactionLayers)) { + while ($savepoint = array_pop($this->transactionLayers)) { if ($savepoint != $name) continue; // If there are no more layers left then we should commit. @@ -1734,7 +1734,7 @@ class DatabaseTransactionExplicitCommitNotAllowedException extends Exception { } /** * Exception thrown for merge queries that do not make semantic sense. * - * There are many ways that a merge query could be malformed. They should all + * There are many ways that a merge query could be malformed. They should all * throw this exception and set an appropriately descriptive message. */ class InvalidMergeQueryException extends Exception {} @@ -2153,7 +2153,7 @@ class DatabaseStatementBase extends PDOStatement implements DatabaseStatementInt * Empty implementation of a database statement. * * This class satisfies the requirements of being a database statement/result - * object, but does not actually contain data. It is useful when developers + * object, but does not actually contain data. It is useful when developers * need to safely return an "empty" result set without connecting to an actual * database. Calling code can then treat it the same as if it were an actual * result set that happens to contain no records. @@ -2611,7 +2611,7 @@ function db_xor() { /** * Returns a new DatabaseCondition, set to the specified conjunction. * - * Internal API function call. The db_and(), db_or(), and db_xor() + * Internal API function call. The db_and(), db_or(), and db_xor() * functions are preferred. * * @param $conjunction diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc index 4e88fa1..5b54188 100644 --- a/includes/database/mysql/schema.inc +++ b/includes/database/mysql/schema.inc @@ -492,7 +492,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function tableExists($table) { // The information_schema table is very slow to query under MySQL 5.0. - // Instead, we try to select from the table in question. If it fails, + // Instead, we try to select from the table in question. If it fails, // the most likely reason is that it does not exist. That is dramatically // faster than using information_schema. // @link http://bugs.mysql.com/bug.php?id=19588 diff --git a/includes/database/query.inc b/includes/database/query.inc index 23b652f..f0522ad 100644 --- a/includes/database/query.inc +++ b/includes/database/query.inc @@ -77,7 +77,7 @@ interface QueryConditionInterface { /** * Sets a condition that the specified subquery returns values. - * + * * @param SelectQueryInterface $select * The subquery that must contain results. * @@ -85,10 +85,10 @@ interface QueryConditionInterface { * The called object. */ public function exists(SelectQueryInterface $select); - + /** * Sets a condition that the specified subquery returns no values. - * + * * @param SelectQueryInterface $select * The subquery that must not contain results. * @@ -96,7 +96,7 @@ interface QueryConditionInterface { * The called object. */ public function notExists(SelectQueryInterface $select); - + /** * Gets a complete list of all conditions in this conditional clause. * @@ -264,14 +264,14 @@ abstract class Query implements QueryPlaceholderInterface { /** * The target of the connection object. - * + * * @var string */ protected $connectionTarget; /** * The key of the connection object. - * + * * @var string */ protected $connectionKey; @@ -764,7 +764,7 @@ class DeleteQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -999,7 +999,7 @@ class UpdateQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -1484,7 +1484,7 @@ class MergeQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -1689,14 +1689,14 @@ class DatabaseCondition implements QueryConditionInterface, Countable { public function exists(SelectQueryInterface $select) { return $this->condition('', $select, 'EXISTS'); } - + /** * Implements QueryConditionInterface::notExists(). */ public function notExists(SelectQueryInterface $select) { return $this->condition('', $select, 'NOT EXISTS'); } - + /** * Implements QueryConditionInterface::conditions(). */ diff --git a/includes/database/select.inc b/includes/database/select.inc index 53be20a..3bd4a52 100644 --- a/includes/database/select.inc +++ b/includes/database/select.inc @@ -10,8 +10,8 @@ require_once dirname(__FILE__) . '/query.inc'; /** * Interface for extendable query objects. * - * "Extenders" follow the "Decorator" OOP design pattern. That is, they wrap - * and "decorate" another object. In our case, they implement the same interface + * "Extenders" follow the "Decorator" OOP design pattern. That is, they wrap + * and "decorate" another object. In our case, they implement the same interface * as select queries and wrap a select query, to which they delegate almost all * operations. Subclasses of this class may implement additional methods or * override existing methods as appropriate. Extenders may also wrap other @@ -23,9 +23,9 @@ interface QueryExtendableInterface { * Enhance this object by wrapping it in an extender object. * * @param $extender_name - * The base name of the extending class. The base name will be checked + * The base name of the extending class. The base name will be checked * against the current database connection to allow driver-specific subclasses - * as well, using the same logic as the query objects themselves. For example, + * as well, using the same logic as the query objects themselves. For example, * PagerDefault_mysql is the MySQL-specific override for PagerDefault. * @return QueryExtendableInterface * The extender object, which now contains a reference to this object. @@ -506,7 +506,7 @@ interface SelectQueryInterface extends QueryConditionInterface, QueryAlterableIn /** * Clone magic method. * - * Select queries have dependent objects that must be deep-cloned. The + * Select queries have dependent objects that must be deep-cloned. The * connection object itself, however, should not be cloned as that would * duplicate the connection itself. */ @@ -694,7 +694,7 @@ class SelectQueryExtender implements SelectQueryInterface { public function execute() { // By calling preExecute() here, we force it to preprocess the extender - // object rather than just the base query object. That means + // object rather than just the base query object. That means // hook_query_alter() gets access to the extended object. if (!$this->preExecute($this)) { return NULL; @@ -818,7 +818,7 @@ class SelectQueryExtender implements SelectQueryInterface { $this->query->notExists($select); return $this; } - + public function __toString() { return (string) $this->query; } @@ -833,18 +833,18 @@ class SelectQueryExtender implements SelectQueryInterface { * Magic override for undefined methods. * * If one extender extends another extender, then methods in the inner extender - * will not be exposed on the outer extender. That's because we cannot know + * will not be exposed on the outer extender. That's because we cannot know * in advance what those methods will be, so we cannot provide wrapping - * implementations as we do above. Instead, we use this slower catch-all method + * implementations as we do above. Instead, we use this slower catch-all method * to handle any additional methods. */ public function __call($method, $args) { $return = call_user_func_array(array($this->query, $method), $args); // Some methods will return the called object as part of a fluent interface. - // Others will return some useful value. If it's a value, then the caller - // probably wants that value. If it's the called object, then we instead - // return this object. That way we don't "lose" an extender layer when + // Others will return some useful value. If it's a value, then the caller + // probably wants that value. If it's the called object, then we instead + // return this object. That way we don't "lose" an extender layer when // chaining methods together. if ($return instanceof SelectQueryInterface) { return $this; @@ -1040,7 +1040,7 @@ class SelectQuery extends Query implements SelectQueryInterface { $this->where->notExists($select); return $this; } - + public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) { return $this->where->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this); } @@ -1088,17 +1088,17 @@ class SelectQuery extends Query implements SelectQueryInterface { $this->having->isNotNull($field); return $this; } - + public function havingExists(SelectQueryInterface $select) { $this->having->exists($select); return $this; } - + public function havingNotExists(SelectQueryInterface $select) { $this->having->notExists($select); return $this; } - + public function forUpdate($set = TRUE) { if (isset($set)) { $this->forUpdate = $set; @@ -1395,7 +1395,7 @@ class SelectQuery extends Query implements SelectQueryInterface { if (!$count->distinct) { // When not executing a distinct query, we can zero-out existing fields - // and expressions that are not used by a GROUP BY. Fields listed in + // and expressions that are not used by a GROUP BY. Fields listed in // the GROUP BY clause need to be present in the query. $fields =& $count->getFields(); foreach (array_keys($fields) as $field) { @@ -1487,7 +1487,7 @@ class SelectQuery extends Query implements SelectQueryInterface { // Don't use the AS keyword for table aliases, as some // databases don't support it (e.g., Oracle). - $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); + $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); if (!empty($table['condition'])) { $query .= ' ON ' . $table['condition']; @@ -1499,7 +1499,7 @@ class SelectQuery extends Query implements SelectQueryInterface { // The following line will not generate placeholders correctly if there // is a subquery. Fortunately, it is also called from getArguments() first // so it's not a problem in practice... unless you try to call __toString() - // before calling getArguments(). That is a problem that we will have to + // before calling getArguments(). That is a problem that we will have to // fix in Drupal 8, because it requires more refactoring than we are // able to do in Drupal 7. // @todo Move away from __toString() For SelectQuery compilation at least. diff --git a/includes/database/sqlite/database.inc b/includes/database/sqlite/database.inc index cf3b955..6164d21 100644 --- a/includes/database/sqlite/database.inc +++ b/includes/database/sqlite/database.inc @@ -37,7 +37,7 @@ class DatabaseConnection_sqlite extends DatabaseConnection { /** * All databases attached to the current database. This is used to allow * prefixes to be safely handled without locking the table - * + * * @var array */ protected $attachedDatabases = array(); @@ -46,10 +46,10 @@ class DatabaseConnection_sqlite extends DatabaseConnection { * Whether or not a table has been dropped this request: the destructor will * only try to get rid of unnecessary databases if there is potential of them * being empty. - * + * * This variable is set to public because DatabaseSchema_sqlite needs to * access it. However, it should not be manually set. - * + * * @var boolean */ var $tableDropped = FALSE; @@ -350,7 +350,7 @@ class DatabaseConnection_sqlite extends DatabaseConnection { } // Commit everything since SAVEPOINT $name. - while($savepoint = array_pop($this->transactionLayers)) { + while ($savepoint = array_pop($this->transactionLayers)) { if ($savepoint != $name) continue; // If there are no more layers left then we should commit or rollback. diff --git a/includes/entity.inc b/includes/entity.inc index 9ee7889..21d0d95 100644 --- a/includes/entity.inc +++ b/includes/entity.inc @@ -840,7 +840,7 @@ class EntityFieldQuery { * Enable a pager for the query. * * @param $limit - * An integer specifying the number of elements per page. If passed a false + * An integer specifying the number of elements per page. If passed a false * value (FALSE, 0, NULL), the pager is disabled. * @param $element * An optional integer to distinguish between multiple pagers on one page. @@ -875,7 +875,7 @@ class EntityFieldQuery { */ public function tableSort(&$headers) { // If 'field' is not initialized, the header columns aren't clickable - foreach ($headers as $key =>$header) { + foreach ($headers as $key => $header) { if (is_array($header) && isset($header['specifier'])) { $headers[$key]['field'] = ''; } diff --git a/includes/errors.inc b/includes/errors.inc index 4c43235..10f9666 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -218,7 +218,7 @@ function _drupal_log_error($error, $fatal = FALSE) { if (drupal_is_cli()) { if ($fatal) { // When called from CLI, simply output a plain text message. - print html_entity_decode(strip_tags(t('%type: !message in %function (line %line of %file).', $error))). "\n"; + print html_entity_decode(strip_tags(t('%type: !message in %function (line %line of %file).', $error))) . "\n"; exit; } } diff --git a/includes/file.inc b/includes/file.inc index b7a1204..18130e7 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -485,7 +485,7 @@ function file_create_htaccess($directory, $private = TRUE) { else { $directory = rtrim($directory, '/\\'); } - $htaccess_path = $directory . '/.htaccess'; + $htaccess_path = $directory . '/.htaccess'; if (file_exists($htaccess_path)) { // Short circuit if the .htaccess file already exists. @@ -1655,7 +1655,7 @@ function file_validate_size(stdClass $file, $file_limit = 0, $user_limit = 0) { $errors = array(); - // Bypass validation for uid = 1. + // Bypass validation for uid = 1. if ($user->uid != 1) { if ($file_limit && $file->filesize > $file_limit) { $errors[] = t('The file is %filesize exceeding the maximum file size of %maxsize.', array('%filesize' => format_size($file->filesize), '%maxsize' => format_size($file_limit))); @@ -1824,7 +1824,7 @@ function file_save_data($data, $destination = NULL, $replace = FILE_EXISTS_RENAM * A string containing the contents of the file. * @param $destination * A string containing the destination location. - * This must be a stream wrapper URI. If no value is provided, a + * This must be a stream wrapper URI. If no value is provided, a * randomized name will be generated and the file is saved using Drupal's * default files scheme, usually "public://". * @param $replace diff --git a/includes/filetransfer/filetransfer.inc b/includes/filetransfer/filetransfer.inc index 2083da9..b224d35 100644 --- a/includes/filetransfer/filetransfer.inc +++ b/includes/filetransfer/filetransfer.inc @@ -304,7 +304,7 @@ abstract class FileTransfer { $check = implode($parts, '/'); if ($this->isFile($check . '/' . basename(__FILE__))) { // Remove the trailing slash. - return substr($chroot,0,-1); + return substr($chroot, 0, -1); } $chroot .= array_shift($parts) . '/'; } diff --git a/includes/filetransfer/ftp.inc b/includes/filetransfer/ftp.inc index 838dc7c..cc05b5c 100644 --- a/includes/filetransfer/ftp.inc +++ b/includes/filetransfer/ftp.inc @@ -86,7 +86,7 @@ class FileTransferFTPExtension extends FileTransferFTP implements FileTransferCh if ($item == '.' || $item == '..') { continue; } - if (@ftp_chdir($this->connection, $item)){ + if (@ftp_chdir($this->connection, $item)) { ftp_cdup($this->connection); $this->removeDirectory(ftp_pwd($this->connection) . '/' . $item); } @@ -122,7 +122,7 @@ class FileTransferFTPExtension extends FileTransferFTP implements FileTransferCh function chmodJailed($path, $mode, $recursive) { if (!ftp_chmod($this->connection, $mode, $path)) { - throw new FileTransferException("Unable to set permissions on %file", NULL, array ('%file' => $path)); + throw new FileTransferException("Unable to set permissions on %file", NULL, array('%file' => $path)); } if ($this->isDirectory($path) && $recursive) { $filelist = @ftp_nlist($this->connection, $path); diff --git a/includes/filetransfer/ssh.inc b/includes/filetransfer/ssh.inc index 43ec324..fdd1d0a 100644 --- a/includes/filetransfer/ssh.inc +++ b/includes/filetransfer/ssh.inc @@ -62,7 +62,7 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface } /** - * WARNING: This is untested. It is not currently used, but should do the trick. + * WARNING: This is untested. It is not currently used, but should do the trick. */ public function isDirectory($path) { $directory = escapeshellarg($path); @@ -72,7 +72,8 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface return TRUE; } return FALSE; - } else { + } + else { throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path)); } } @@ -85,7 +86,8 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface return TRUE; } return FALSE; - } else { + } + else { throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path)); } } diff --git a/includes/form.inc b/includes/form.inc index 8f2ee26..7b959a4 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -377,7 +377,7 @@ function form_state_defaults() { 'submitted' => FALSE, 'executed' => FALSE, 'programmed' => FALSE, - 'cache'=> FALSE, + 'cache' => FALSE, 'method' => 'post', 'groups' => array(), 'buttons' => array(), @@ -2383,7 +2383,7 @@ function form_type_token_value($element, $input = FALSE) { * array's keys to the element whose value you want to update. For instance, * if you want to update the value of $form['elem1']['elem2'], which should be * stored in $form_state['values']['elem1']['elem2'], you would set - * $element['#parents'] = array('elem1','elem2'). + * $element['#parents'] = array('elem1', 'elem2'). * @param $value * The new value for the form element. * @param $form_state @@ -2709,14 +2709,14 @@ function theme_radios($variables) { * Expand a password_confirm field into two text boxes. */ function form_process_password_confirm($element) { - $element['pass1'] = array( + $element['pass1'] = array( '#type' => 'password', '#title' => t('Password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass1'], '#required' => $element['#required'], '#attributes' => array('class' => array('password-field')), ); - $element['pass2'] = array( + $element['pass2'] = array( '#type' => 'password', '#title' => t('Confirm password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass2'], @@ -3113,11 +3113,11 @@ function theme_container($variables) { * @code * $options = array(); * $options[0]['title'] = "A red row" - * $options[0]['#attributes'] = array ('class' => array('red-row')); + * $options[0]['#attributes'] = array('class' => array('red-row')); * $options[1]['title'] = "A blue row" - * $options[1]['#attributes'] = array ('class' => array('blue-row')); + * $options[1]['#attributes'] = array('class' => array('blue-row')); * - * $form['myselector'] = array ( + * $form['myselector'] = array( * '#type' => 'tableselect', * '#title' => 'My Selector' * '#options' => $options, diff --git a/includes/install.core.inc b/includes/install.core.inc index a74dfdf..56dae46 100644 --- a/includes/install.core.inc +++ b/includes/install.core.inc @@ -1106,7 +1106,7 @@ function install_select_profile_form($form, &$form_state, $profile_files) { ); } $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array( + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); @@ -1255,7 +1255,7 @@ function install_select_locale_form($form, &$form_state, $locales, $profilename) ); } $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array( + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); diff --git a/includes/install.inc b/includes/install.inc index 3634660..6f6cf5f 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -410,7 +410,7 @@ abstract class DatabaseTasks { $message = ''; foreach ($this->results as $result => $success) { if (!$success) { - $message .= '

' . $result . '

'; + $message .= '

' . $result . '

'; } } if (!empty($message)) { @@ -561,7 +561,7 @@ abstract class DatabaseTasks { // Verify the database port. if (!empty($database['port']) && !is_numeric($database['port'])) { - $errors[$database['driver'] . '][advanced_options][port'] = st('Database port must be a number.'); + $errors[$database['driver'] . '][advanced_options][port'] = st('Database port must be a number.'); } return $errors; @@ -1045,7 +1045,7 @@ function st($string, array $args = array(), array $options = array()) { // with its name ending in {$install_state['parameters']['locale']}.po // This might or might not be the entire filename. It is also possible // that multiple files end with the same extension, even if unlikely. - $po_files = file_scan_directory('./profiles/' . $install_state['parameters']['profile'] . '/translations', '/'. $install_state['parameters']['locale'] .'\.po$/', array('recurse' => FALSE)); + $po_files = file_scan_directory('./profiles/' . $install_state['parameters']['profile'] . '/translations', '/' . $install_state['parameters']['locale'] . '\.po$/', array('recurse' => FALSE)); if (count($po_files)) { require_once DRUPAL_ROOT . '/includes/locale.inc'; foreach ($po_files as $po_file) { diff --git a/includes/mail.inc b/includes/mail.inc index be2df92..c559a6f 100644 --- a/includes/mail.inc +++ b/includes/mail.inc @@ -55,7 +55,7 @@ define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || strpos($_SERVER['SERVER * $data['user'] = $params['account']; * $options['language'] = $message['language']; * user_mail_tokens($variables, $data, $options); - * switch($key) { + * switch ($key) { * case 'notice': * $langcode = $message['language']->language; * $message['subject'] = t('Notification from !site', $variables, array('langcode' => $langcode)); @@ -179,7 +179,7 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N * DefaultMailSystem implementation. * * The selection of a particular implementation is controlled via the variable - * 'mail_system', which is a keyed array. The default implementation + * 'mail_system', which is a keyed array. The default implementation * is the class whose name is the value of 'default-system' key. A more specific * match first to key and then to module will be used in preference to the * default. To specificy a different class for all mail sent by one module, set diff --git a/includes/menu.inc b/includes/menu.inc index 3a376f2..565aa6d 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -305,7 +305,7 @@ define('MENU_MAX_DEPTH', 9); function menu_get_ancestors($parts) { $number_parts = count($parts); $ancestors = array(); - $length = $number_parts - 1; + $length = $number_parts - 1; $end = (1 << $number_parts) - 1; $masks = variable_get('menu_masks', array()); // Only examine patterns that actually exist as router items (the masks). @@ -3408,7 +3408,7 @@ function _menu_router_build($callbacks) { $parts[$k] = '%'; } else { - $fit |= 1 << ($slashes - $k); + $fit |= 1 << ($slashes - $k); } } if ($fit) { diff --git a/includes/pager.inc b/includes/pager.inc index 146033f..1117a6f 100644 --- a/includes/pager.inc +++ b/includes/pager.inc @@ -9,7 +9,7 @@ /** * Query extender for pager queries. * - * This is the "default" pager mechanism. It creates a paged query with a fixed + * This is the "default" pager mechanism. It creates a paged query with a fixed * number of entries per page. */ class PagerDefault extends SelectQueryExtender { @@ -96,11 +96,11 @@ class PagerDefault extends SelectQueryExtender { /** * Specify the count query object to use for this pager. * - * You will rarely need to specify a count query directly. If not specified, + * You will rarely need to specify a count query directly. If not specified, * one is generated off of the pager query itself. * * @param SelectQueryInterface $query - * The count query object. It must return a single row with a single column, + * The count query object. It must return a single row with a single column, * which is the total number of records. */ public function setCountQuery(SelectQueryInterface $query) { @@ -131,7 +131,7 @@ class PagerDefault extends SelectQueryExtender { * The default if not specified is 10 items per page. * * @param $limit - * An integer specifying the number of elements per page. If passed a false + * An integer specifying the number of elements per page. If passed a false * value (FALSE, 0, NULL), the pager is disabled. */ public function limit($limit = 10) { @@ -143,8 +143,8 @@ class PagerDefault extends SelectQueryExtender { * Specify the element ID for this pager query. * * The element is used to differentiate different pager queries on the same - * page so that they may be operated independently. If you do not specify an - * element, every pager query on the page will get a unique element. If for + * page so that they may be operated independently. If you do not specify an + * element, every pager query on the page will get a unique element. If for * whatever reason you want to explicitly define an element for a given query, * you may do so here. * @@ -154,7 +154,7 @@ class PagerDefault extends SelectQueryExtender { * Note that no collision detection is done when setting an element ID * explicitly, so it is possible for two pagers to end up using the same ID * if both are set explicitly. - * + * * @param $element */ public function element($element) { diff --git a/includes/password.inc b/includes/password.inc index 13659f8..4004dcb 100644 --- a/includes/password.inc +++ b/includes/password.inc @@ -177,7 +177,7 @@ function _password_crypt($algo, $password, $setting) { } while (--$count); $len = strlen($hash); - $output = $setting . _password_base64_encode($hash, $len); + $output = $setting . _password_base64_encode($hash, $len); // _password_base64_encode() of a 16 byte MD5 will always be 22 characters. // _password_base64_encode() of a 64 byte sha512 will always be 86 characters. $expected = 12 + ceil((8 * $len) / 6); @@ -248,7 +248,7 @@ function user_check_password($password, $account) { case '$H$': // phpBB3 uses "$H$" for the same thing as "$P$". case '$P$': - // A phpass password generated using md5. This is an + // A phpass password generated using md5. This is an // imported password or from an earlier Drupal version. $hash = _password_crypt('md5', $password, $stored_hash); break; diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc index 7df1f9d..4d4a382 100644 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -587,7 +587,7 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface */ public function dirname($uri = NULL) { list($scheme, $target) = explode('://', $uri, 2); - $target = $this->getTarget($uri); + $target = $this->getTarget($uri); $dirname = dirname($target); if ($dirname == '.') { diff --git a/includes/update.inc b/includes/update.inc index f7a8fd6..cbee34e 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -636,7 +636,7 @@ function update_retrieve_dependencies() { $return = array(); // Get a list of installed modules, arranged so that we invoke their hooks in // the same order that module_invoke_all() does. - $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version != :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol(); + $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version <> :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol(); foreach ($modules as $module) { $function = $module . '_update_dependencies'; if (function_exists($function)) { diff --git a/misc/ajax.js b/misc/ajax.js index fb03e2b..7692d8e 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -195,16 +195,16 @@ Drupal.ajax = function (base, element, element_settings) { * will test to see if the key press is valid to trigger this event and * if it is, trigger it for us and prevent other keypresses from triggering. * In this case we're handling RETURN and SPACEBAR keypresses (event codes 13 - * and 32. RETURN is often used to submit a form when in a textfield, and - * SPACE is often used to activate an element without submitting. + * and 32. RETURN is often used to submit a form when in a textfield, and + * SPACE is often used to activate an element without submitting. */ Drupal.ajax.prototype.keypressResponse = function (element, event) { // Create a synonym for this to reduce code confusion. var ajax = this; // Detect enter key and space bar and allow the standard response for them, - // except for form elements of type 'text' and 'textarea', where the - // spacebar activation causes inappropriate activation if #ajax['keypress'] is + // except for form elements of type 'text' and 'textarea', where the + // spacebar activation causes inappropriate activation if #ajax['keypress'] is // TRUE. On a text-type widget a space should always be a space. if (event.which == 13 || (event.which == 32 && element.type != 'text' && element.type != 'textarea')) { $(ajax.element_settings.element).trigger(ajax.element_settings.event); diff --git a/misc/collapse.js b/misc/collapse.js index 1a98dc0..6189151 100644 --- a/misc/collapse.js +++ b/misc/collapse.js @@ -58,7 +58,7 @@ Drupal.behaviors.collapse = { $('fieldset.collapsible', context).once('collapse', function () { var $fieldset = $(this); // Expand fieldset if there are errors inside, or if it contains an - // element that is targeted by the uri fragment identifier. + // element that is targeted by the uri fragment identifier. var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : ''; if ($('.error' + anchor, $fieldset).length) { $fieldset.removeClass('collapsed'); diff --git a/misc/tabledrag.js b/misc/tabledrag.js index b566168..88e0be7 100644 --- a/misc/tabledrag.js +++ b/misc/tabledrag.js @@ -810,8 +810,8 @@ Drupal.tableDrag.prototype.copyDragClasses = function (sourceRow, targetRow, gro }; Drupal.tableDrag.prototype.checkScroll = function (cursorY) { - var de = document.documentElement; - var b = document.body; + var de = document.documentElement; + var b = document.body; var windowHeight = this.windowHeight = window.innerHeight || (de.clientHeight && de.clientWidth != 0 ? de.clientHeight : b.offsetHeight); var scrollY = this.scrollY = (document.all ? (!de.scrollTop ? b.scrollTop : de.scrollTop) : (window.pageYOffset ? window.pageYOffset : window.scrollY)); diff --git a/misc/ui/jquery.ui.button.css b/misc/ui/jquery.ui.button.css index 973c314..ee294fb 100644 --- a/misc/ui/jquery.ui.button.css +++ b/misc/ui/jquery.ui.button.css @@ -11,8 +11,8 @@ .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } /*button text element */ .ui-button .ui-button-text { display: block; line-height: 1.4; } diff --git a/misc/ui/jquery.ui.datepicker.css b/misc/ui/jquery.ui.datepicker.css index a904884..4102e05 100644 --- a/misc/ui/jquery.ui.datepicker.css +++ b/misc/ui/jquery.ui.datepicker.css @@ -20,7 +20,7 @@ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } diff --git a/misc/ui/jquery.ui.dialog.css b/misc/ui/jquery.ui.dialog.css index 156e03a..bf6690c 100644 --- a/misc/ui/jquery.ui.dialog.css +++ b/misc/ui/jquery.ui.dialog.css @@ -10,7 +10,7 @@ */ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } .ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test index 1ab12dc..2158711 100644 --- a/modules/aggregator/aggregator.test +++ b/modules/aggregator/aggregator.test @@ -371,7 +371,7 @@ class UpdateFeedTestCase extends AggregatorTestCase { // Get new feed data array and modify newly created feed. $edit = $this->getFeedEditArray(); - $edit['refresh'] = 1800; // Change refresh value. + $edit['refresh'] = 1800; // Change refresh value. if (isset($feed->{$same_field})) { $edit[$same_field] = $feed->{$same_field}; } diff --git a/modules/block/block.api.php b/modules/block/block.api.php index d33f594..98a1ab4 100644 --- a/modules/block/block.api.php +++ b/modules/block/block.api.php @@ -226,7 +226,8 @@ function hook_block_view($delta = '') { '#theme' => 'node_recent_block', '#nodes' => $nodes, ); - } else { + } + else { $block['content'] = t('No content available.'); } } diff --git a/modules/block/block.test b/modules/block/block.test index 022bf38..6d4b156 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -420,7 +420,7 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase { } /** - * Check for the accessibility of the admin theme on the block admin page. + * Check for the accessibility of the admin theme on the block admin page. */ function testAdminTheme() { // Create administrative user. diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 731bd2f..5a41c58 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -23,7 +23,7 @@ function blog_node_info() { */ function blog_user_view($account) { if (user_access('create blog content', $account)) { - $account->content['summary']['blog'] = array( + $account->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), // l() escapes the attributes, so we should not escape !username here. diff --git a/modules/book/book.module b/modules/book/book.module index de9561f..e890dfa 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -1042,11 +1042,11 @@ function template_preprocess_book_navigation(&$variables) { * * This helper function recursively modifies the $toc array for each item in * $tree, ignoring items in the exclude array or at a depth greater than the - * limit. Truncates titles over thirty characters and appends an indentation + * limit. Truncates titles over thirty characters and appends an indentation * string incremented by depth. * * @param $tree - * The data structure of the book's menu tree. Includes hidden links. + * The data structure of the book's menu tree. Includes hidden links. * @param $indent * A string appended to each menu item title. Increments by '--' per depth * level. diff --git a/modules/color/color.module b/modules/color/color.module index 18954fe..8358791 100644 --- a/modules/color/color.module +++ b/modules/color/color.module @@ -244,11 +244,11 @@ function theme_color_scheme_form($variables) { $info = $form['info']['#value']; $path = drupal_get_path('theme', $theme) . '/'; drupal_add_css($path . $info['preview_css']); - + $preview_js_path = isset($info['preview_js']) ? $path . $info['preview_js'] : drupal_get_path('module', 'color') . '/' . 'preview.js'; // Add the JS at a weight below color.js. drupal_add_js($preview_js_path, array('weight' => -1)); - + $output = ''; $output .= '
'; // Color schemes diff --git a/modules/color/color.test b/modules/color/color.test index 897bd6c..f867082 100644 --- a/modules/color/color.test +++ b/modules/color/color.test @@ -122,7 +122,7 @@ class ColorTestCase extends DrupalWebTestCase { $edit['palette[bg]'] = $color; $this->drupalPost($settings_path, $edit, t('Save configuration')); - if($is_valid) { + if ($is_valid) { $this->assertText('The configuration options have been saved.'); } else { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 60a9ca4..2106842 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -92,7 +92,7 @@ function comment_help($path, $arg) { * Implements hook_entity_info(). */ function comment_entity_info() { - $return = array( + $return = array( 'comment' => array( 'label' => t('Comment'), 'base table' => 'comment', @@ -539,7 +539,7 @@ function comment_new_page_count($num_comments, $new_replies, $node) { elseif ($flat) { // Flat comments. $count = $num_comments - $new_replies; - $pageno = $count / $comments_per_page; + $pageno = $count / $comments_per_page; } else { // Threaded comments: we build a query with a subquery to find the first @@ -572,7 +572,7 @@ function comment_new_page_count($num_comments, $new_replies, $node) { ':thread' => $first_thread, ))->fetchField(); - $pageno = $count / $comments_per_page; + $pageno = $count / $comments_per_page; } if ($pageno >= 1) { @@ -1436,7 +1436,7 @@ function comment_save($comment) { $transaction = db_transaction(); try { - $defaults = array( + $defaults = array( 'mail' => '', 'homepage' => '', 'name' => '', diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 770e01d..dcd584c 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -1,7 +1,7 @@ $original) { - switch($name) { + switch ($name) { case 'comment-count': $replacements[$original] = $node->comment_count; break; diff --git a/modules/contact/contact.test b/modules/contact/contact.test index bc44f5a..761e0d0 100644 --- a/modules/contact/contact.test +++ b/modules/contact/contact.test @@ -1,7 +1,7 @@ drupalGet('user/' . $this->contact_user->uid. '/contact'); + $this->drupalGet('user/' . $this->contact_user->uid . '/contact'); $this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.', array('%number' => $flood_limit, '@interval' => format_interval(variable_get('contact_threshold_window', 3600)))), 'Normal user denied access to flooded contact form.'); // Test that the admin user can still access the contact form even though diff --git a/modules/dashboard/dashboard.js b/modules/dashboard/dashboard.js index ebecbf6..9d706f3 100644 --- a/modules/dashboard/dashboard.js +++ b/modules/dashboard/dashboard.js @@ -23,7 +23,8 @@ Drupal.behaviors.dashboard = { // Check if we are in customize mode and grab the correct empty text if ($('#dashboard').hasClass('customize-mode')) { empty_text = Drupal.settings.dashboard.emptyRegionTextActive; - } else { + } + else { empty_text = Drupal.settings.dashboard.emptyRegionTextInactive; } // We need a placeholder. diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test index d2781eb..cdb7e16 100644 --- a/modules/dblog/dblog.test +++ b/modules/dblog/dblog.test @@ -471,7 +471,7 @@ class DBLogTestCase extends DrupalWebTestCase { $count = $this->getTypeCount($types); $this->assertEqual(array_sum($count), $type['count'], 'Count matched'); } - + // Clear all logs and make sure the confirmation message is found. $this->drupalPost('admin/reports/dblog', array(), t('Clear log messages')); $this->assertText(t('Database log cleared.'), t('Confirmation message found')); diff --git a/modules/field/modules/options/options.module b/modules/field/modules/options/options.module index 385f3f4..8f50903 100644 --- a/modules/field/modules/options/options.module +++ b/modules/field/modules/options/options.module @@ -200,7 +200,7 @@ function _options_properties($type, $multiple, $required, $has_value) { if (!$required) { $properties['empty_option'] = 'option_none'; } - else if (!$has_value) { + elseif (!$has_value) { $properties['empty_option'] = 'option_select'; } } diff --git a/modules/field/modules/options/options.test b/modules/field/modules/options/options.test index ea58f27..7150279 100644 --- a/modules/field/modules/options/options.test +++ b/modules/field/modules/options/options.test @@ -1,7 +1,7 @@ 'invisible', '#size' => 15, '#description' => t('Label'), - '#prefix' => '
' . t('Add new field') .'
', + '#prefix' => '
' . t('Add new field') . '
', '#suffix' => '
', ), 'weight' => array( @@ -483,7 +483,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle // This field should stay LTR even for RTL languages. '#field_prefix' => 'field_', '#field_suffix' => '‎', - '#attributes' => array('dir'=>'ltr'), + '#attributes' => array('dir' => 'ltr'), '#size' => 10, '#description' => t('Field name (a-z, 0-9, _)'), '#prefix' => '
 
', @@ -527,7 +527,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle '#size' => 15, '#description' => t('Label'), '#attributes' => array('class' => array('label-textfield')), - '#prefix' => '
' . t('Add existing field') .'
', + '#prefix' => '
' . t('Add existing field') . '
', '#suffix' => '
', ), 'weight' => array( diff --git a/modules/field_ui/field_ui.module b/modules/field_ui/field_ui.module index b828fff..2386f9b 100644 --- a/modules/field_ui/field_ui.module +++ b/modules/field_ui/field_ui.module @@ -353,6 +353,6 @@ function field_ui_form_node_type_form_alter(&$form, $form_state) { */ function field_ui_form_node_type_form_submit($form, &$form_state) { if ($form_state['clicked_button']['#parents'][0] === 'save_continue') { - $form_state['redirect'] = _field_ui_bundle_admin_path('node', $form_state['values']['type']) .'/fields'; + $form_state['redirect'] = _field_ui_bundle_admin_path('node', $form_state['values']['type']) . '/fields'; } } diff --git a/modules/field_ui/field_ui.test b/modules/field_ui/field_ui.test index 5d2ff9b..08bbd08 100644 --- a/modules/field_ui/field_ui.test +++ b/modules/field_ui/field_ui.test @@ -26,7 +26,7 @@ class FieldUITestCase extends DrupalWebTestCase { $this->drupalLogin($admin_user); // Create content type, with underscores. - $type_name = strtolower($this->randomName(8)) . '_' .'test'; + $type_name = strtolower($this->randomName(8)) . '_' . 'test'; $type = $this->drupalCreateContentType(array('name' => $type_name, 'type' => $type_name)); $this->type = $type->type; // Store a valid URL name, with hyphens instead of underscores. @@ -147,7 +147,7 @@ class FieldUIManageFieldsTestCase extends FieldUITestCase { // Create random field name. $this->field_label = $this->randomName(8); - $this->field_name_input = strtolower($this->randomName(8)); + $this->field_name_input = strtolower($this->randomName(8)); $this->field_name = 'field_'. $this->field_name_input; } @@ -343,7 +343,7 @@ class FieldUIManageFieldsTestCase extends FieldUITestCase { $this->fieldUIAddNewField($bundle_path1, $edit1); // Create an additional node type. - $type_name2 = strtolower($this->randomName(8)) . '_' .'test'; + $type_name2 = strtolower($this->randomName(8)) . '_' . 'test'; $type2 = $this->drupalCreateContentType(array('name' => $type_name2, 'type' => $type_name2)); $type_name2 = $type2->type; $hyphen_type2 = str_replace('_', '-', $type_name2); diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 773fa80..9f81496 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -779,7 +779,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE) * default, if NULL. * * The resulting value for the element will be an array holding the value and the - * format. For example, the value for the body element will be: + * format. For example, the value for the body element will be: * @code * $form_state['values']['body']['value'] = 'foo'; * $form_state['values']['body']['format'] = 'foo'; @@ -1082,7 +1082,7 @@ function filter_dom_serialize($dom_document) { * Adds comments around the childNodes as $node) { if (get_class($node) == 'DOMCdataSection') { - // See drupal_get_js(). This code is more or less duplicated there. + // See drupal_get_js(). This code is more or less duplicated there. $embed_prefix = "\n{$comment_end}\n"; $fragment = $dom_document->createDocumentFragment(); @@ -1528,7 +1528,7 @@ function _filter_url_escape_comments($match, $escape = NULL) { if (isset($escape)) { $mode = $escape; - if ($escape){ + if ($escape) { $comments = array(); } return; diff --git a/modules/filter/tests/filter.url-input.txt b/modules/filter/tests/filter.url-input.txt index 7b33af5..9dff613 100644 --- a/modules/filter/tests/filter.url-input.txt +++ b/modules/filter/tests/filter.url-input.txt @@ -30,7 +30,7 @@ The old URL filter has problems with This is the end! \ No newline at end of file diff --git a/modules/forum/forum.install b/modules/forum/forum.install index b5817ab..0f18a5a 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -196,7 +196,7 @@ function forum_schema() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default'=> 0, + 'default' => 0, ), 'last_comment_timestamp' => array( 'type' => 'int', diff --git a/modules/forum/forum.module b/modules/forum/forum.module index c58b5c9..4895519 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -304,7 +304,7 @@ function forum_node_validate($node, $form) { form_set_error('taxonomy_forums', t('Select a forum.')); continue; } - $used = db_query_range('SELECT 1 FROM {taxonomy_term_data} WHERE tid = :tid AND vid = :vid',0 , 1, array( + $used = db_query_range('SELECT 1 FROM {taxonomy_term_data} WHERE tid = :tid AND vid = :vid', 0, 1, array( ':tid' => $term->tid, ':vid' => $term->vid, ))->fetchField(); diff --git a/modules/forum/forum.test b/modules/forum/forum.test index 1dc45c6..f13289a 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -155,7 +155,7 @@ class ForumTestCase extends DrupalWebTestCase { // Create an orphan forum item. $this->drupalLogin($this->admin_user); - $this->drupalPost('node/add/forum', array('title' => $this->randomName(10), 'body[' . LANGUAGE_NONE .'][0][value]' => $this->randomName(120)), t('Save')); + $this->drupalPost('node/add/forum', array('title' => $this->randomName(10), 'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomName(120)), t('Save')); $nid_count = db_query('SELECT COUNT(nid) FROM {node}')->fetchField(); $this->assertEqual(0, $nid_count, t('A forum node was not created when missing a forum vocabulary.')); diff --git a/modules/help/help.api.php b/modules/help/help.api.php index ff2f97c..0167271 100644 --- a/modules/help/help.api.php +++ b/modules/help/help.api.php @@ -22,7 +22,7 @@ * * @param $path * The router menu path, as defined in hook_menu(), for the help that is - * being requested; e.g., 'admin/people' or 'user/register'. If the router + * being requested; e.g., 'admin/people' or 'user/register'. If the router * path includes a wildcard, then this will appear in $path as %, even if it * is a named %autoloader wildcard in the hook_menu() implementation; for * example, node pages would have $path equal to 'node/%' or 'node/%/view'. diff --git a/modules/image/image.module b/modules/image/image.module index 5caf282..25206ed 100644 --- a/modules/image/image.module +++ b/modules/image/image.module @@ -48,7 +48,7 @@ function image_help($path, $arg) { $output .= '
' . t('With the Image module you can scale, crop, resize, rotate and desaturate images without affecting the original image using image styles. When you change an image style, the module automatically refreshes all created images. Every image style must have a name, which will be used in the URL of the generated images. There are two common approaches to naming image styles (which you use will depend on how the image style is being applied):',array('@image' => url('admin/config/media/image-styles'))); $output .= '
  • ' . t('Based on where it will be used: eg. profile-picture') . '
  • '; $output .= '
  • ' . t('Describing its appearance: eg. square-85x85') . '
'; - $output .= t('After you create an image style, you can add effects: crop, scale, resize, rotate, and desaturate (other contributed modules provide additional effects). For example, by combining effects as crop, scale, and desaturate, you can create square, grayscale thumbnails.') . '
'; + $output .= t('After you create an image style, you can add effects: crop, scale, resize, rotate, and desaturate (other contributed modules provide additional effects). For example, by combining effects as crop, scale, and desaturate, you can create square, grayscale thumbnails.') . '
'; $output .= '
' . t('Attaching images to content as fields') . '
'; $output .= '
' . t("Image module also allows you to attach images to content as fields. To add an image field to a content type, go to the content type's manage fields page, and add a new field of type Image. Attaching images to content this way allows image styles to be applied and maintained, and also allows you more flexibility when theming.", array('@content-type' => url('admin/structure/types'))) . '
'; $output .= ''; diff --git a/modules/image/image.test b/modules/image/image.test index 00f79d8..5040ede 100644 --- a/modules/image/image.test +++ b/modules/image/image.test @@ -192,7 +192,7 @@ class ImageStylesPathAndUrlUnitTest extends DrupalWebTestCase { $this->assertNotIdentical(FALSE, $original_uri, t('Created the generated image file.')); // Get the URL of a file that has not been generated and try to create it. - $generated_uri = $scheme . '://styles/' . $this->style_name . '/' . $scheme . '/'. basename($original_uri); + $generated_uri = $scheme . '://styles/' . $this->style_name . '/' . $scheme . '/' . basename($original_uri); $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.')); $generate_url = image_style_url($this->style_name, $original_uri); diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 42a6dbc..ecb2974 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -361,7 +361,7 @@ class LocaleTranslationFunctionalTest extends DrupalWebTestCase { ->condition('l.textgroup', 'default') ->execute(); $url = 'admin/config/regional/translate/edit/' . $result->fetchObject()->lid; - $edit = array('translations['. $langcode .']' => $this->randomName()); + $edit = array('translations[' . $langcode . ']' => $this->randomName()); $this->drupalPost($url, $edit, t('Save translations')); // Trigger JavaScript translation parsing and building. @@ -1040,7 +1040,7 @@ class LocaleExportFunctionalTest extends DrupalWebTestCase { */ function testExportTranslationTemplateFile() { // Get the translation template file. - // There are two 'Export' buttons on this page, but it somehow works. It'd + // There are two 'Export' buttons on this page, but it somehow works. It'd // be better if we could use the submit button id like documented but that // doesn't work. $this->drupalPost('admin/config/regional/translate/export', array(), t('Export')); @@ -1755,7 +1755,7 @@ class LocaleContentFunctionalTest extends DrupalWebTestCase { // Create "Basic page" content. $node_title = $this->randomName(); - $node_body = $this->randomName(); + $node_body = $this->randomName(); $edit = array( 'type' => 'page', 'title' => $node_title, @@ -2393,7 +2393,7 @@ class LocaleLanguageNegotiationInfoFunctionalTest extends DrupalWebTestCase { function setUp() { parent::setUp('locale'); - require_once DRUPAL_ROOT .'/includes/language.inc'; + require_once DRUPAL_ROOT . '/includes/language.inc'; $admin_user = $this->drupalCreateUser(array('administer languages', 'access administration pages', 'view the administration theme')); $this->drupalLogin($admin_user); $this->drupalPost('admin/config/regional/language/add', array('langcode' => 'it'), t('Add language')); @@ -2425,7 +2425,7 @@ class LocaleLanguageNegotiationInfoFunctionalTest extends DrupalWebTestCase { $test_type = 'test_language_type'; $provider = LOCALE_LANGUAGE_NEGOTIATION_INTERFACE; $test_provider = 'test_language_provider'; - $form_field = $type . '[enabled]['. $provider .']'; + $form_field = $type . '[enabled][' . $provider . ']'; $edit = array( $form_field => TRUE, $type . '[enabled][' . $test_provider . ']' => TRUE, diff --git a/modules/locale/tests/locale_test.module b/modules/locale/tests/locale_test.module index 14a2588..70fee5c 100644 --- a/modules/locale/tests/locale_test.module +++ b/modules/locale/tests/locale_test.module @@ -69,7 +69,7 @@ function locale_test_language_negotiation_info() { 'callbacks' => array( 'language' => 'locale_test_language_provider', ), - 'file' => drupal_get_path('module', 'locale_test') .'/locale_test.module', + 'file' => drupal_get_path('module', 'locale_test') . '/locale_test.module', 'weight' => -10, 'description' => t('This is a test language provider.'), ); diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc index ec073e5..00041cc 100644 --- a/modules/menu/menu.admin.inc +++ b/modules/menu/menu.admin.inc @@ -68,7 +68,7 @@ function menu_overview_form($form, &$form_state, $menu) { $menu_admin = FALSE; $form = array_merge($form, _menu_overview_tree_form($tree)); - $form['#menu'] = $menu; + $form['#menu'] = $menu; if (element_children($form)) { $form['actions'] = array('#type' => 'actions'); @@ -78,7 +78,7 @@ function menu_overview_form($form, &$form_state, $menu) { ); } else { - $form['#empty_text'] = t('There are no menu links yet. Add link.', array('@link' => url('admin/structure/menu/manage/'. $form['#menu']['menu_name'] .'/add'))); + $form['#empty_text'] = t('There are no menu links yet. Add link.', array('@link' => url('admin/structure/menu/manage/' . $form['#menu']['menu_name'] . '/add'))); } return $form; } diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index a6ea1b5..6c0d041 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -423,7 +423,7 @@ function node_admin_nodes() { } } $nids = $query - ->fields('n',array('nid')) + ->fields('n', array('nid')) ->limit(50) ->orderByHeader($header) ->execute() diff --git a/modules/node/node.api.php b/modules/node/node.api.php index d7a98c6..bce2f80 100644 --- a/modules/node/node.api.php +++ b/modules/node/node.api.php @@ -19,7 +19,7 @@ * node operation: * - Node-type-specific hooks: These hooks are only invoked on the primary * module, using the "base" return component of hook_node_info() as the - * function prefix. For example, poll.module defines the base for the Poll + * function prefix. For example, poll.module defines the base for the Poll * content type as "poll", so during creation of a poll node, hook_insert() is * only invoked by calling poll_insert(). * - All-module hooks: This set of hooks is invoked on all implementing @@ -725,7 +725,7 @@ function hook_node_update_index($node) { * To indicate a validation error, use form_set_error(). * * Note: Changes made to the $node object within your hook implementation will - * have no effect. The preferred method to change a node's content is to use + * have no effect. The preferred method to change a node's content is to use * hook_node_presave() instead. If it is really necessary to change * the node at the validate stage, you can use form_set_value(). * @@ -1201,7 +1201,7 @@ function hook_update($node) { * To indicate a validation error, use form_set_error(). * * Note: Changes made to the $node object within your hook implementation will - * have no effect. The preferred method to change a node's content is to use + * have no effect. The preferred method to change a node's content is to use * hook_node_presave() instead. * * @param $node diff --git a/modules/node/node.module b/modules/node/node.module index 2dd1926..55d2134 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2124,7 +2124,8 @@ function node_block_view($delta = '') { $block['content'] = theme('node_recent_block', array( 'nodes' => $nodes, )); - } else { + } + else { $block['content'] = t('No content available.'); } } @@ -2895,7 +2896,7 @@ function node_access($op, $node, $account = NULL) { if (count($grants) > 0) { $query->condition($grants); } - $result = (bool) $query + $result = (bool) $query ->execute() ->fetchField(); $rights[$account->uid][$cid][$op] = $result; @@ -3806,7 +3807,8 @@ function node_requirements($phase) { $grant_count = db_query('SELECT COUNT(*) FROM {node_access}')->fetchField(); if ($grant_count != 1 || count(module_implements('node_grants')) > 0) { $value = format_plural($grant_count, 'One permission in use', '@count permissions in use', array('@count' => $grant_count)); - } else { + } + else { $value = $t('Disabled'); } $description = $t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed, content will automatically use the new permissions.'); diff --git a/modules/node/node.test b/modules/node/node.test index 8a871c0..794b93d 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -1578,7 +1578,7 @@ class NodeTitleTestCase extends DrupalWebTestCase { // Test tag. $this->drupalGet("node/$node->nid"); $xpath = '//title'; - $this->assertEqual(current($this->xpath($xpath)), $node->title .' | Drupal', 'Page title is equal to node title.', 'Node'); + $this->assertEqual(current($this->xpath($xpath)), $node->title . ' | Drupal', 'Page title is equal to node title.', 'Node'); // Test breadcrumb in comment preview. $this->drupalGet("comment/reply/$node->nid"); @@ -1982,7 +1982,7 @@ class NodeQueryAlter extends DrupalWebTestCase { } // Have node_test_node_grants return a node_access_all privilege, - // to grant the noAccessUser 'view' access. To verify that + // to grant the noAccessUser 'view' access. To verify that // node_access_view_all_nodes is properly checking the specified // $account instead of the global $user, we will log in as // noAccessUser2. diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index 6945f34..0f15ce6 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -89,7 +89,7 @@ function openid_redirect_http($url, $message) { */ function openid_redirect($url, $message) { global $language; - + $output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n"; $output .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . $language->language . '" lang="' . $language->language . '">' . "\n"; $output .= "<head>\n"; @@ -693,7 +693,7 @@ function _openid_get_math_library() { if (empty($library)) { if (function_exists('gmp_add')) { - $library = 'gmp'; + $library = 'gmp'; } elseif (function_exists('bcadd')) { $library = 'bcmath'; diff --git a/modules/openid/openid.module b/modules/openid/openid.module index e312866..83645a3 100644 --- a/modules/openid/openid.module +++ b/modules/openid/openid.module @@ -677,7 +677,7 @@ function openid_authentication_request($claimed_id, $identity, $return_to = '', module_load_include('inc', 'openid'); - $request = array( + $request = array( 'openid.mode' => 'checkid_setup', 'openid.identity' => $identity, 'openid.assoc_handle' => $assoc_handle, @@ -687,10 +687,10 @@ function openid_authentication_request($claimed_id, $identity, $return_to = '', if ($service['version'] == 2) { $request['openid.ns'] = OPENID_NS_2_0; $request['openid.claimed_id'] = $claimed_id; - $request['openid.realm'] = $base_url .'/'; + $request['openid.realm'] = $base_url . '/'; } else { - $request['openid.trust_root'] = $base_url .'/'; + $request['openid.trust_root'] = $base_url . '/'; } // Always request Simple Registration. The specification doesn't mandate @@ -925,7 +925,7 @@ function openid_verify_assertion_return_url($service, $response) { $return_to_parts = parse_url($response['openid.return_to']); $base_url_parts = parse_url($base_url); - $current_parts = parse_url($base_url_parts['scheme'] .'://'. $base_url_parts['host'] . request_uri()); + $current_parts = parse_url($base_url_parts['scheme'] . '://' . $base_url_parts['host'] . request_uri()); if ($return_to_parts['scheme'] != $current_parts['scheme'] || $return_to_parts['host'] != $current_parts['host'] || $return_to_parts['path'] != $current_parts['path']) { return FALSE; diff --git a/modules/poll/poll.module b/modules/poll/poll.module index f45b8bd..4866029 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -618,7 +618,7 @@ function poll_block_latest_poll_view($node) { // This is necessary for shared objects because PHP doesn't copy objects, but // passes them by reference. So when the objects are cached it can result in - // the wrong output being displayed on subsequent calls. The cloning and + // the wrong output being displayed on subsequent calls. The cloning and // unsetting of $node->content prevents the block output from being the same // as the node output. $node = clone $node; diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test index 9f786ab..ff49f89 100644 --- a/modules/rdf/rdf.test +++ b/modules/rdf/rdf.test @@ -629,35 +629,35 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { // success of the following tests, but making it explicit will make // debugging easier in case of failure. $tracker_about = $this->xpath('//tr[@about=:url]', array(':url' => $url)); - $this->assertTrue(!empty($tracker_about), t('About attribute found on table row for @user content.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_about), t('About attribute found on table row for @user content.', array('@user' => $user))); // Tests whether the title has the correct property attribute. $tracker_title = $this->xpath('//tr[@about=:url]/td[@property="dc:title" and @datatype=""]', array(':url' => $url)); - $this->assertTrue(!empty($tracker_title), t('Title property attribute found on @user content.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_title), t('Title property attribute found on @user content.', array('@user' => $user))); // Tests whether the relationship between the content and user has been set. $tracker_user = $this->xpath('//tr[@about=:url]//td[contains(@rel, "sioc:has_creator")]//*[contains(@typeof, "sioc:UserAccount") and contains(@property, "foaf:name")]', array(':url' => $url)); - $this->assertTrue(!empty($tracker_user), t('Typeof and name property attributes found on @user.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_user), t('Typeof and name property attributes found on @user.', array('@user' => $user))); // There should be an about attribute on logged in users and no about // attribute for anonymous users. $tracker_user = $this->xpath('//tr[@about=:url]//td[@rel="sioc:has_creator"]/*[@about]', array(':url' => $url)); if ($node->uid == 0) { - $this->assertTrue(empty($tracker_user), t('No about attribute is present on @user.', array('@user'=> $user))); + $this->assertTrue(empty($tracker_user), t('No about attribute is present on @user.', array('@user' => $user))); } elseif ($node->uid > 0) { - $this->assertTrue(!empty($tracker_user), t('About attribute is present on @user.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_user), t('About attribute is present on @user.', array('@user' => $user))); } // Tests whether the property has been set for number of comments. $tracker_replies = $this->xpath('//tr[@about=:url]//td[contains(@property, "sioc:num_replies") and contains(@content, "0") and @datatype="xsd:integer"]', array(':url' => $url)); - $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user'=> $user))); + $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user' => $user))); // Tests that the appropriate RDFa markup to annotate the latest activity // date has been added to the tracker output before comments have been // posted, meaning the latest activity reflects changes to the node itself. $isoDate = date('c', $node->changed); $tracker_activity = $this->xpath('//tr[@about=:url]//td[contains(@property, "dc:modified") and contains(@property, "sioc:last_activity_date") and contains(@datatype, "xsd:dateTime") and @content=:date]', array(':url' => $url, ':date' => $isoDate)); - $this->assertTrue(!empty($tracker_activity), t('Latest activity date and changed properties found when there are no comments on @user content. Latest activity date content is correct.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_activity), t('Latest activity date and changed properties found when there are no comments on @user content. Latest activity date content is correct.', array('@user' => $user))); // Tests that the appropriate RDFa markup to annotate the latest activity // date has been added to the tracker output after a comment is posted. @@ -670,7 +670,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { // Tests whether the property has been set for number of comments. $tracker_replies = $this->xpath('//tr[@about=:url]//td[contains(@property, "sioc:num_replies") and contains(@content, "1") and @datatype="xsd:integer"]', array(':url' => $url)); - $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user'=> $user))); + $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user' => $user))); // Need to query database directly to obtain last_activity_date because // it cannot be accessed via node_load(). @@ -680,7 +680,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { } $isoDate = date('c', $expected_last_activity_date); $tracker_activity = $this->xpath('//tr[@about=:url]//td[@property="sioc:last_activity_date" and @datatype="xsd:dateTime" and @content=:date]', array(':url' => $url, ':date' => $isoDate)); - $this->assertTrue(!empty($tracker_activity), t('Latest activity date found when there are comments on @user content. Latest activity date content is correct.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_activity), t('Latest activity date found when there are comments on @user content. Latest activity date content is correct.', array('@user' => $user))); } } diff --git a/modules/search/search-result.tpl.php b/modules/search/search-result.tpl.php index 30b321f..d6281f8 100644 --- a/modules/search/search-result.tpl.php +++ b/modules/search/search-result.tpl.php @@ -56,7 +56,7 @@ * * To check for all available data within $info_split, use the code below. * @code - * <?php print '<pre>'. check_plain(print_r($info_split, 1)) .'</pre>'; ?> + * <?php print '<pre>' . check_plain(print_r($info_split, 1)) . '</pre>'; ?> * @endcode * * @see template_preprocess() diff --git a/modules/search/search.extender.inc b/modules/search/search.extender.inc index b7af4d0..3aa962d 100644 --- a/modules/search/search.extender.inc +++ b/modules/search/search.extender.inc @@ -174,9 +174,9 @@ class SearchQuery extends SelectQueryExtender { protected function parseSearchExpression() { // Matchs words optionally prefixed by a dash. A word in this case is // something between two spaces, optionally quoted. - preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression , $keywords, PREG_SET_ORDER); + preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression, $keywords, PREG_SET_ORDER); - if (count($keywords) == 0) { + if (count($keywords) == 0) { return; } diff --git a/modules/search/search.module b/modules/search/search.module index 518272a..36dedb4 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -1037,7 +1037,7 @@ function search_box_form_submit($form, &$form_state) { // Check to see if the form was submitted empty. // If it is empty, display an error message. // (This method is used instead of setting #required to TRUE for this field - // because that results in a confusing error message. It would say a plain + // because that results in a confusing error message. It would say a plain // "field is required" because the search keywords field has no title. // The error message would also complain about a missing #title field.) if ($form_state['values']['search_block_form'] == '') { diff --git a/modules/search/search.pages.inc b/modules/search/search.pages.inc index ebf8f60..53b8780 100644 --- a/modules/search/search.pages.inc +++ b/modules/search/search.pages.inc @@ -51,7 +51,7 @@ function search_view($module = NULL, $keys = '') { // form submits with POST but redirects to GET. This way we can keep // the search query URL clean as a whistle. if (empty($_POST['form_id']) || $_POST['form_id'] != 'search_form') { - $conditions = NULL; + $conditions = NULL; if (isset($info['conditions_callback']) && function_exists($info['conditions_callback'])) { // Build an optional array of more search conditions. $conditions = call_user_func($info['conditions_callback'], $keys); diff --git a/modules/search/search.test b/modules/search/search.test index 4d37133..2cdc723 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -450,7 +450,7 @@ class SearchRankingTestCase extends DrupalWebTestCase { function testHTMLRankings() { // Login with sufficient privileges. $this->drupalLogin($this->drupalCreateUser(array('create page content'))); - + // Test HTML tags with different weights. $sorted_tags = array('h1', 'h2', 'h3', 'h4', 'a', 'h5', 'h6', 'notag'); $shuffled_tags = $sorted_tags; @@ -482,7 +482,7 @@ class SearchRankingTestCase extends DrupalWebTestCase { // Refresh variables after the treatment. $this->refreshVariables(); - + // Disable all other rankings. $node_ranks = array('sticky', 'promote', 'recent', 'comments', 'views'); foreach ($node_ranks as $node_rank) { @@ -495,7 +495,8 @@ class SearchRankingTestCase extends DrupalWebTestCase { // Assert the results. if ($tag == 'notag') { $this->assertEqual($set[$tag_rank]['node']->nid, $nodes[$tag]->nid, 'Search tag ranking for plain text order.'); - } else { + } + else { $this->assertEqual($set[$tag_rank]['node']->nid, $nodes[$tag]->nid, 'Search tag ranking for "<' . $sorted_tags[$tag_rank] . '>" order.'); } } @@ -520,7 +521,7 @@ class SearchRankingTestCase extends DrupalWebTestCase { // Assert the results. $this->assertEqual($set[0]['node']->nid, $node->nid, 'Search tag ranking for "<' . $tag . '>" order.'); - + // Delete node so it doesn't show up in subsequent search results. node_delete($node->nid); } @@ -861,7 +862,7 @@ class SearchCommentTestCase extends DrupalWebTestCase { $this->setRolePermissions(DRUPAL_AUTHENTICATED_RID, TRUE, TRUE); $this->setRolePermissions($this->admin_role, TRUE, FALSE); $this->checkCommentAccess('Admin user has access comments permission and no search permission, but comments should be indexed because admin user inherits authenticated user\'s permission to search', TRUE); - + } /** diff --git a/modules/shortcut/shortcut.test b/modules/shortcut/shortcut.test index e37e1e5..42e1a5d 100644 --- a/modules/shortcut/shortcut.test +++ b/modules/shortcut/shortcut.test @@ -75,7 +75,7 @@ class ShortcutTestCase extends DrupalWebTestCase { /** * Extracts information from shortcut set links. - * + * * @param object $set * The shortcut set object to extract information from. * @param string $key @@ -293,7 +293,7 @@ class ShortcutSetsTestCase extends ShortcutTestCase { */ function testShortcutSetRename() { $set = $this->set; - + $new_title = $this->randomName(10); $this->drupalPost('admin/config/user-interface/shortcut/' . $set->set_name . '/edit', array('title' => $new_title), t('Save')); $set = shortcut_set_load($set->set_name); diff --git a/modules/simpletest/simpletest.test b/modules/simpletest/simpletest.test index f516364..cced54c 100644 --- a/modules/simpletest/simpletest.test +++ b/modules/simpletest/simpletest.test @@ -88,8 +88,8 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase { if (!$this->inCURL()) { global $base_url; $simpletest_path = $base_url . '/' . drupal_get_path('module', 'simpletest'); - $HTTP_path = $simpletest_path .'/tests/http.php?q=node'; - $https_path = $simpletest_path .'/tests/https.php?q=node'; + $HTTP_path = $simpletest_path . '/tests/http.php?q=node'; + $https_path = $simpletest_path . '/tests/https.php?q=node'; // Generate a valid simpletest User-Agent to pass validation. $this->assertTrue(preg_match('/simpletest\d+/', $this->databasePrefix, $matches), t('Database prefix contains simpletest prefix.')); $test_ua = drupal_generate_test_ua($matches[0]); @@ -404,7 +404,7 @@ class SimpleTestMailCaptureTestCase extends DrupalWebTestCase { $body = $this->randomString(128); $message = array( 'id' => 'drupal_mail_test', - 'headers' => array('Content-type'=> 'text/html'), + 'headers' => array('Content-type' => 'text/html'), 'subject' => $subject, 'to' => 'foobar@example.com', 'body' => $body, @@ -431,7 +431,7 @@ class SimpleTestMailCaptureTestCase extends DrupalWebTestCase { for ($index = 0; $index < 5; $index++) { $message = array( 'id' => 'drupal_mail_test_' . $index, - 'headers' => array('Content-type'=> 'text/html'), + 'headers' => array('Content-type' => 'text/html'), 'subject' => $this->randomString(64), 'to' => $this->randomName(32) . '@example.com', 'body' => $this->randomString(512), @@ -466,7 +466,7 @@ class SimpleTestFolderTestCase extends DrupalWebTestCase { public static function getInfo() { return array( 'name' => 'Testing SimpleTest setUp', - 'description' => "This test will check SimpleTest's treatment of hook_install during setUp. Image module is used for test.", + 'description' => "This test will check SimpleTest's treatment of hook_install during setUp. Image module is used for test.", 'group' => 'SimpleTest', ); } diff --git a/modules/simpletest/tests/batch.test b/modules/simpletest/tests/batch.test index d1c0e0b..351ddd7 100644 --- a/modules/simpletest/tests/batch.test +++ b/modules/simpletest/tests/batch.test @@ -161,7 +161,7 @@ class BatchProcessingTestCase extends DrupalWebTestCase { * TRUE on pass, FALSE on fail. */ function assertBatchMessages($texts, $message) { - $pattern = '|' . implode('.*', $texts) .'|s'; + $pattern = '|' . implode('.*', $texts) . '|s'; return $this->assertPattern($pattern, $message); } diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 6cee722..49673d8 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -1704,8 +1704,8 @@ class DrupalRenderTestCase extends DrupalWebTestCase { protected function assertRenderedElement(array $element, $xpath, array $xpath_args = array()) { $original_element = $element; $this->drupalSetContent(drupal_render($element)); - $this->verbose('<pre>' . check_plain(var_export($original_element, TRUE)) . '</pre>' - . '<pre>' . check_plain(var_export($element, TRUE)) . '</pre>' + $this->verbose('<pre>' . check_plain(var_export($original_element, TRUE)) . '</pre>' + . '<pre>' . check_plain(var_export($element, TRUE)) . '</pre>' . '<hr />' . $this->drupalGetContent() ); diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test index 143640d..ea3cc29 100644 --- a/modules/simpletest/tests/database_test.test +++ b/modules/simpletest/tests/database_test.test @@ -573,7 +573,7 @@ class DatabaseInsertTestCase extends DatabaseTestCase { // re-ordered. $query->addExpression('tp.age', 'age'); $query - ->fields('tp', array('name','job')) + ->fields('tp', array('name', 'job')) ->condition('tp.name', 'Meredith'); // The resulting query should be equivalent to: @@ -800,7 +800,7 @@ class DatabaseUpdateTestCase extends DatabaseTestCase { ->fields(array('age' => 1)) ->execute(); - // Ensure that expressions are handled properly. This should set every + // Ensure that expressions are handled properly. This should set every // record's age to a square of itself, which will change only three of the // four records in the table since 1*1 = 1. That means only three records // are modified, so we should get back 3, not 4, from execute(). diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test index dc12b1b..4a5bf31 100644 --- a/modules/simpletest/tests/file.test +++ b/modules/simpletest/tests/file.test @@ -2337,7 +2337,7 @@ class FileURLRewritingTest extends FileTestCase { /** * Test the generating of rewritten shipped file URLs. */ - function testShippedFileURL() { + function testShippedFileURL() { // Test generating an URL to a shipped file (i.e. a file that is part of // Drupal core, a module or a theme, for example a JavaScript file). diff --git a/modules/simpletest/tests/file_test.module b/modules/simpletest/tests/file_test.module index 2865a1f..c75385c 100644 --- a/modules/simpletest/tests/file_test.module +++ b/modules/simpletest/tests/file_test.module @@ -133,7 +133,7 @@ function _file_test_form_submit(&$form, &$form_state) { /** * Reset/initialize the history of calls to the file_* hooks. * - * @see file_test_get_calls() + * @see file_test_get_calls() * @see file_test_reset() */ function file_test_reset() { diff --git a/modules/simpletest/tests/filetransfer.test b/modules/simpletest/tests/filetransfer.test index 905d23c..39f91b3 100644 --- a/modules/simpletest/tests/filetransfer.test +++ b/modules/simpletest/tests/filetransfer.test @@ -79,7 +79,7 @@ class FileTranferTest extends DrupalWebTestCase { $gotit = TRUE; try { - $this->testConnection->copyDirectory($source, DRUPAL_ROOT . '/'. variable_get('file_public_path', conf_path() . '/files')); + $this->testConnection->copyDirectory($source, DRUPAL_ROOT . '/' . variable_get('file_public_path', conf_path() . '/files')); } catch (FileTransferException $e) { $gotit = FALSE; diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test index e7ae9de..773e4a7 100644 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -521,7 +521,7 @@ class FormValidationTestCase extends DrupalWebTestCase { */ function testValidateLimitErrors() { $edit = array( - 'test' => 'invalid', + 'test' => 'invalid', 'test_numeric_index[0]' => 'invalid', 'test_substring[foo]' => 'invalid', ); diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test index bb01265..2676d1b 100644 --- a/modules/simpletest/tests/menu.test +++ b/modules/simpletest/tests/menu.test @@ -839,22 +839,22 @@ class MenuTreeOutputTestCase extends DrupalWebTestCase { * Dummy link structure acceptable for menu_tree_output(). */ var $tree_data = array( - '1'=> array( - 'link' => array( 'menu_name' => 'main-menu', 'mlid' => 1, 'hidden'=>0, 'has_children' => 1, 'title' => 'Item 1', 'in_active_trail' => 1, 'access'=>1, 'href' => 'a', 'localized_options' => array('attributes' => array('title' =>'')) ), + '1' => array( + 'link' => array('menu_name' => 'main-menu', 'mlid' => 1, 'hidden' => 0, 'has_children' => 1, 'title' => 'Item 1', 'in_active_trail' => 1, 'access' => 1, 'href' => 'a', 'localized_options' => array('attributes' => array('title' => '')) ), 'below' => array( - '2' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 2, 'hidden'=>0, 'has_children' => 1, 'title' => 'Item 2', 'in_active_trail' => 1, 'access'=>1, 'href' => 'a/b', 'localized_options' => array('attributes' => array('title' =>'')) ), + '2' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 2, 'hidden' => 0, 'has_children' => 1, 'title' => 'Item 2', 'in_active_trail' => 1, 'access' => 1, 'href' => 'a/b', 'localized_options' => array('attributes' => array('title' => '')) ), 'below' => array( - '3' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 3, 'hidden'=>0, 'has_children' => 0, 'title' => 'Item 3', 'in_active_trail' => 0, 'access'=>1, 'href' => 'a/b/c', 'localized_options' => array('attributes' => array('title' =>'')) ), + '3' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 3, 'hidden' => 0, 'has_children' => 0, 'title' => 'Item 3', 'in_active_trail' => 0, 'access' => 1, 'href' => 'a/b/c', 'localized_options' => array('attributes' => array('title' => '')) ), 'below' => array() ), - '4' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 4, 'hidden'=>0, 'has_children' => 0, 'title' => 'Item 4', 'in_active_trail' => 0, 'access'=>1, 'href' => 'a/b/d', 'localized_options' => array('attributes' => array('title' =>'')) ), + '4' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 4, 'hidden' => 0, 'has_children' => 0, 'title' => 'Item 4', 'in_active_trail' => 0, 'access' => 1, 'href' => 'a/b/d', 'localized_options' => array('attributes' => array('title' => '')) ), 'below' => array() ) ) ) ) ), - '5' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 5, 'hidden'=>1, 'has_children' => 0, 'title' => 'Item 5', 'in_active_trail' => 0, 'access'=>1, 'href' => 'e', 'localized_options' => array('attributes' => array('title' =>'')) ), 'below' => array( ) ), - '6' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 6, 'hidden'=>0, 'has_children' => 0, 'title' => 'Item 6', 'in_active_trail' => 0, 'access'=>0, 'href' => 'f', 'localized_options' => array('attributes' => array('title' =>'')) ), 'below' => array( ) ), - '7' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 7, 'hidden'=>0, 'has_children' => 0, 'title' => 'Item 7', 'in_active_trail' => 0, 'access'=>1, 'href' => 'g', 'localized_options' => array('attributes' => array('title' =>'')) ), 'below' => array( ) ) + '5' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 5, 'hidden' => 1, 'has_children' => 0, 'title' => 'Item 5', 'in_active_trail' => 0, 'access' => 1, 'href' => 'e', 'localized_options' => array('attributes' => array('title' => '')) ), 'below' => array( ) ), + '6' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 6, 'hidden' => 0, 'has_children' => 0, 'title' => 'Item 6', 'in_active_trail' => 0, 'access' => 0, 'href' => 'f', 'localized_options' => array('attributes' => array('title' => '')) ), 'below' => array( ) ), + '7' => array('link' => array( 'menu_name' => 'main-menu', 'mlid' => 7, 'hidden' => 0, 'has_children' => 0, 'title' => 'Item 7', 'in_active_trail' => 0, 'access' => 1, 'href' => 'g', 'localized_options' => array('attributes' => array('title' => '')) ), 'below' => array( ) ) ); public static function getInfo() { @@ -864,7 +864,7 @@ class MenuTreeOutputTestCase extends DrupalWebTestCase { 'group' => 'Menu', ); } - + function setUp() { parent::setUp(); } diff --git a/modules/simpletest/tests/schema.test b/modules/simpletest/tests/schema.test index 8945117..20724c5 100644 --- a/modules/simpletest/tests/schema.test +++ b/modules/simpletest/tests/schema.test @@ -182,7 +182,7 @@ class SchemaTestCase extends DrupalWebTestCase { // Now set up columns for the other types. $types = array('int', 'float', 'numeric'); foreach ($types as $type) { - $column_spec = array('type' => $type, 'unsigned'=> TRUE); + $column_spec = array('type' => $type, 'unsigned' => TRUE); if ($type == 'numeric') { $column_spec += array('precision' => 10, 'scale' => 0); } diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test index bc72e5c..a003a21 100644 --- a/modules/simpletest/tests/session.test +++ b/modules/simpletest/tests/session.test @@ -455,7 +455,7 @@ class SessionHttpsTestCase extends DrupalWebTestCase { } } - // Test that session data saved before login is not available using the + // Test that session data saved before login is not available using the // pre-login anonymous cookie. $this->cookies = array(); $this->drupalGet('session-test/get', array('Cookie: ' . $anonymous_cookie)); diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index d0ad77d..5a12e25 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -115,7 +115,7 @@ class ThemeTableUnitTest extends DrupalWebTestCase { */ function testThemeTableStickyHeaders() { $header = array('one', 'two', 'three'); - $rows = array(array(1,2,3), array(4,5,6), array(7,8,9)); + $rows = array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)); $this->content = theme('table', array('header' => $header, 'rows' => $rows)); $js = drupal_add_js(); $this->assertTrue(isset($js['misc/tableheader.js']), t('tableheader.js was included when $sticky = TRUE.')); @@ -128,7 +128,7 @@ class ThemeTableUnitTest extends DrupalWebTestCase { */ function testThemeTableNoStickyHeaders() { $header = array('one', 'two', 'three'); - $rows = array(array(1,2,3), array(4,5,6), array(7,8,9)); + $rows = array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)); $attributes = array(); $caption = NULL; $colgroups = array(); diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 9e7d69d..8c57bdd 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1131,7 +1131,7 @@ function system_modules_submit($form, &$form_state) { return; } - // Invokes hook_requirements('install'). If failures are detected, makes sure + // Invokes hook_requirements('install'). If failures are detected, makes sure // the dependent modules aren't installed either. foreach ($modules as $name => $module) { // Only invoke hook_requirements() on modules that are going to be installed. @@ -1486,7 +1486,7 @@ function system_site_information_settings() { '#title' => t('Default front page'), '#default_value' => (variable_get('site_frontpage')!='node'?drupal_get_path_alias(variable_get('site_frontpage', 'node')):''), '#size' => 40, - '#description' => t('Optionally, specify a relative URL to display as the front page. Leave blank to display the default content feed.'), + '#description' => t('Optionally, specify a relative URL to display as the front page. Leave blank to display the default content feed.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='), ); $form['error_page'] = array( @@ -1561,7 +1561,7 @@ function system_site_information_settings_validate($form, &$form_state) { */ function system_cron_settings() { $form['description'] = array( - '#markup' => '<p>'.t('Cron takes care of running periodical tasks like checking for updates and indexing content for search.').'</p>', + '#markup' => '<p>' . t('Cron takes care of running periodical tasks like checking for updates and indexing content for search.') . '</p>', ); $form['run'] = array( '#type' => 'submit', @@ -1912,7 +1912,7 @@ function system_regional_settings() { '#default_value' => $configurable_timezones, ); - $form['timezone']['configurable_timezones_wrapper'] = array( + $form['timezone']['configurable_timezones_wrapper'] = array( '#type' => 'container', '#states' => array( // Hide the user configured timezone settings when users are forced to use @@ -2642,7 +2642,7 @@ function theme_system_themes_page($variables) { continue; } // Start new theme group. - $output .= '<div class="system-themes-list system-themes-list-'. $state .' clearfix"><h2>'. $title .'</h2>'; + $output .= '<div class="system-themes-list system-themes-list-' . $state . ' clearfix"><h2>' . $title . '</h2>'; foreach ($theme_groups[$state] as $theme) { @@ -2656,7 +2656,7 @@ function theme_system_themes_page($variables) { $notes = count($theme->notes) ? ' (' . join(', ', $theme->notes) . ')' : ''; $theme->classes[] = 'theme-selector'; $theme->classes[] = 'clearfix'; - $output .= '<div class="'. join(' ', $theme->classes) .'">' . $screenshot . '<div class="theme-info"><h3>' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '</h3><div class="theme-description">' . $description . '</div>'; + $output .= '<div class="' . join(' ', $theme->classes) . '">' . $screenshot . '<div class="theme-info"><h3>' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '</h3><div class="theme-description">' . $description . '</div>'; // Make sure to provide feedback on compatibility. if (!empty($theme->incompatible_core)) { diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 18cd7fe..9c3655b 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -2703,7 +2703,7 @@ function hook_file_download($uri) { /** * Alter the URL to a file. * - * This hook is called from file_create_url(), and is called fairly + * This hook is called from file_create_url(), and is called fairly * frequently (10+ times per page), depending on how many files there are in a * given page. * If CSS and JS aggregation are disabled, this can become very frequently diff --git a/modules/system/system.install b/modules/system/system.install index 6d2fc80..760e565 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -58,7 +58,7 @@ function system_requirements($phase) { if (function_exists('phpinfo')) { $requirements['php'] = array( 'title' => $t('PHP'), - 'value' => ($phase == 'runtime') ? $phpversion .' ('. l($t('more information'), 'admin/reports/status/php') .')' : $phpversion, + 'value' => ($phase == 'runtime') ? $phpversion . ' (' . l($t('more information'), 'admin/reports/status/php') . ')' : $phpversion, ); } else { diff --git a/modules/system/system.module b/modules/system/system.module index 3ebc657..999e5a4 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1881,7 +1881,7 @@ function system_init() { // Ignore slave database servers for this request. // // In Drupal's distributed database structure, new data is written to the master - // and then propagated to the slave servers. This means there is a lag + // and then propagated to the slave servers. This means there is a lag // between when data is written to the master and when it is available on the slave. // At these times, we will want to avoid using a slave server temporarily. // For example, if a user posts a new node then we want to disable the slave diff --git a/modules/system/system.tar.inc b/modules/system/system.tar.inc index fd1d3c8..5af84ab 100644 --- a/modules/system/system.tar.inc +++ b/modules/system/system.tar.inc @@ -94,10 +94,10 @@ class Archive_Tar // extends PEAR * If the compress argument is set the tar will be read or created as a * gzip or bz2 compressed TAR file. * - * @param string $p_tarname The name of the tar archive to create + * @param string $p_tarname The name of the tar archive to create * @param string $p_compress can be null, 'gz' or 'bz2'. This * parameter indicates if gzip or bz2 compression - * is required. For compatibility reason the + * is required. For compatibility reason the * boolean value 'true' means 'gz'. * @access public */ diff --git a/modules/system/system.test b/modules/system/system.test index 3ce5177..7587211 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -2227,7 +2227,7 @@ class SystemIndexPhpTest extends DrupalWebTestCase { $this->drupalGet($index_php, array('external' => TRUE, 'query' => array('q' => 'user'))); $this->assertResponse(200, t('Make sure index.php?q=user returns a valid page.')); - $this->drupalGet($index_php .'/user', array('external' => TRUE)); + $this->drupalGet($index_php . '/user', array('external' => TRUE)); $this->assertResponse(404, t("Make sure index.php/user returns a 'page not found'.")); } } diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install index 10009d6..4adee9e 100644 --- a/modules/taxonomy/taxonomy.install +++ b/modules/taxonomy/taxonomy.install @@ -196,7 +196,7 @@ function taxonomy_schema() { 'description' => 'The Unix timestamp when the node was created.', 'type' => 'int', 'not null' => TRUE, - 'default'=> 0, + 'default' => 0, ), ), 'indexes' => array( diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index dc2847d..02fc7f8 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -25,7 +25,7 @@ function taxonomy_help($path, $arg) { $output .= '<h3>' . t('Uses') . '</h3>'; $output .= '<dl>'; $output .= '<dt>' . t('Creating vocabularies') . '</dt>'; - $output .= '<dd>' . t('Users with sufficient <a href="@perm">permissions</a> can create <em>vocabularies</em> and <em>terms</em> through the <a href="@taxo">Taxonomy page</a>. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A <em>controlled vocabulary</em> classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => url('admin/structure/taxonomy'), '@perm' => url('admin/people/permissions', array('fragment'=>'module-taxonomy')))); + $output .= '<dd>' . t('Users with sufficient <a href="@perm">permissions</a> can create <em>vocabularies</em> and <em>terms</em> through the <a href="@taxo">Taxonomy page</a>. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A <em>controlled vocabulary</em> classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => url('admin/structure/taxonomy'), '@perm' => url('admin/people/permissions', array('fragment' => 'module-taxonomy')))); $output .= '<ul><li>' . t('<em>vocabulary</em>: Music') . '</li>'; $output .= '<ul><li>' . t('<em>term</em>: Jazz') . '</li>'; $output .= '<ul><li>' . t('<em>sub-term</em>: Swing') . '</li>'; @@ -1471,7 +1471,7 @@ function taxonomy_field_formatter_prepare_view($entity_type, $entities, $field, $items[$id][$delta]['taxonomy_term'] = $terms[$item['tid']]; } // Terms to be created are not in $terms, but are still legitimate. - else if ($item['tid'] == 'autocreate') { + elseif ($item['tid'] == 'autocreate') { // Leave the item in place. } // Otherwise, unset the instance value, since the term does not exist. diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index 1fd47f5..02f6547 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -513,7 +513,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { $langcode = LANGUAGE_NONE; $edit["title"] = $this->randomName(); $edit["body[$langcode][0][value]"] = $this->randomName(); - $edit[$this->instance['field_name'] . '[' . $langcode .'][]'] = $term1->tid; + $edit[$this->instance['field_name'] . '[' . $langcode . '][]'] = $term1->tid; $this->drupalPost('node/add/article', $edit, t('Save')); // Check that the term is displayed when the node is viewed. @@ -723,7 +723,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { $this->assertEqual($terms[0]->tid, $term1->tid, t('Term 1 was moved to back above term 2.')); $this->assertEqual($terms[1]->tid, $term2->tid, t('Term 2 was moved to back below term 1.')); $this->assertEqual($terms[2]->tid, $term3->tid, t('Term 3 is still below term 2.')); - $this->assertEqual($terms[2]->parents, array($term2->tid), t('Term 3 is still a child of term 2.').var_export($terms[1]->tid,1)); + $this->assertEqual($terms[2]->parents, array($term2->tid), t('Term 3 is still a child of term 2.') . var_export($terms[1]->tid, 1)); } /** @@ -737,7 +737,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { $this->assertTrue(isset($terms[$term->tid]), t('Term loaded using exact name.')); // Load the term with space concatenated. - $terms = taxonomy_get_term_by_name(' ' . $term->name . ' '); + $terms = taxonomy_get_term_by_name(' ' . $term->name . ' '); $this->assertTrue(isset($terms[$term->tid]), t('Term loaded with extra whitespace.')); // Load the term with name uppercased. diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css index cbf3c14..f8c7357 100644 --- a/modules/toolbar/toolbar.css +++ b/modules/toolbar/toolbar.css @@ -97,14 +97,14 @@ body.toolbar-drawer { } #toolbar div.toolbar-menu a.toggle:focus, #toolbar div.toolbar-menu a.toggle:hover { - background-position: -50px -20px; + background-position: -50px -20px; } #toolbar div.toolbar-menu a.toggle-active { - background-position: -25px -20px; + background-position: -25px -20px; } #toolbar div.toolbar-menu a.toggle-active.toggle:focus, #toolbar div.toolbar-menu a.toggle-active.toggle:hover { - background-position: -75px -20px; + background-position: -75px -20px; } #toolbar div.toolbar-menu ul li a { padding: 0 10px; diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module index 61ae648..7063335 100644 --- a/modules/toolbar/toolbar.module +++ b/modules/toolbar/toolbar.module @@ -183,7 +183,7 @@ function toolbar_view() { $module_path = drupal_get_path('module', 'toolbar'); $build = array( '#theme' => 'toolbar', - '#attached'=> array( + '#attached' => array( 'js' => array( $module_path . '/toolbar.js', array( @@ -263,7 +263,7 @@ function toolbar_view() { 'toolbar-drawer', 'clearfix', ); - if(_toolbar_is_collapsed()) { + if (_toolbar_is_collapsed()) { $toolbar_drawer_classes[] = 'collapsed'; } $build['toolbar_drawer_classes'] = implode(' ', $toolbar_drawer_classes); diff --git a/modules/tracker/tracker.pages.inc b/modules/tracker/tracker.pages.inc index 7b1e946..30eeae0 100644 --- a/modules/tracker/tracker.pages.inc +++ b/modules/tracker/tracker.pages.inc @@ -86,7 +86,7 @@ function tracker_page($account = NULL, $set_title = FALSE) { $row['replies'] += rdf_rdfa_attributes($mapping['comment_count']); $row['replies'] += array('content' => $node->comment_count); // If the node has no comments, we assume the node itself was modified - // and apply 'changed' in addition to 'last_activity'. If there are + // and apply 'changed' in addition to 'last_activity'. If there are // comments present, we cannot infer whether the node itself was // modified or a comment was posted, so we use only 'last_activity'. $mapping_last_activity = rdf_rdfa_attributes($mapping['last_activity'], $node->last_activity); diff --git a/modules/tracker/tracker.test b/modules/tracker/tracker.test index 3cc227e..506de03 100644 --- a/modules/tracker/tracker.test +++ b/modules/tracker/tracker.test @@ -36,7 +36,7 @@ class TrackerTest extends DrupalWebTestCase { $this->drupalLogin($this->user); $unpublished = $this->drupalCreateNode(array( - 'title' =>$this->randomName(8), + 'title' => $this->randomName(8), 'status' => 0, )); $published = $this->drupalCreateNode(array( diff --git a/modules/translation/translation.test b/modules/translation/translation.test index 54b53d9..3424453 100644 --- a/modules/translation/translation.test +++ b/modules/translation/translation.test @@ -64,7 +64,7 @@ class TranslationTestCase extends DrupalWebTestCase { function testContentTranslation() { // Create Basic page in English. $node_title = $this->randomName(); - $node_body = $this->randomName(); + $node_body = $this->randomName(); $node = $this->createPage($node_title, $node_body, 'en'); // Unpublish the original node to check that this has no impact on the diff --git a/modules/update/update.manager.inc b/modules/update/update.manager.inc index 35b2929..0e3ff84 100644 --- a/modules/update/update.manager.inc +++ b/modules/update/update.manager.inc @@ -120,7 +120,7 @@ function update_manager_update_form($form, $form_state = array(), $context) { $recommended_release = $project['releases'][$project['recommended']]; $recommended_version = $recommended_release['version'] . ' ' . l(t('(Release notes)'), $recommended_release['release_link'], array('attributes' => array('title' => t('Release notes for @project_title', array('@project_title' => $project['title']))))); if ($recommended_release['version_major'] != $project['existing_major']) { - $recommended_version .= '<div title="Major upgrade warning" class="update-major-version-warning">' . t('This update is a major version update which means that it may not be backwards compatible with your currently running version. It is recommended that you read the release notes and proceed at your own risk.') . '</div>'; + $recommended_version .= '<div title="Major upgrade warning" class="update-major-version-warning">' . t('This update is a major version update which means that it may not be backwards compatible with your currently running version. It is recommended that you read the release notes and proceed at your own risk.') . '</div>'; } // Create an entry for this project. @@ -746,7 +746,7 @@ function update_manager_install_form_submit($form, &$form_state) { function update_manager_archive_extract($file, $directory) { $archiver = archiver_get_archiver($file); if (!$archiver) { - throw new Exception(t('Cannot extract %file, not a valid archive.', array ('%file' => $file))); + throw new Exception(t('Cannot extract %file, not a valid archive.', array('%file' => $file))); } // Remove the directory if it exists, otherwise it might contain a mixture of diff --git a/modules/update/update.test b/modules/update/update.test index e72f4c5..b938b85 100644 --- a/modules/update/update.test +++ b/modules/update/update.test @@ -634,7 +634,7 @@ class UpdateTestUploadCase extends UpdateTestHelper { * Ensure that archiver extensions are properly merged in the UI. */ function testFileNameExtensionMerging() { - $this->drupalGet('admin/modules/install'); + $this->drupalGet('admin/modules/install'); // Make sure the bogus extension supported by update_test.module is there. $this->assertPattern('/file extensions are supported:.*update-test-extension/', t("Found 'update-test-extension' extension")); // Make sure it didn't clobber the first option from core. diff --git a/modules/user/tests/user_form_test.module b/modules/user/tests/user_form_test.module index 4e907f3..a964211 100644 --- a/modules/user/tests/user_form_test.module +++ b/modules/user/tests/user_form_test.module @@ -35,7 +35,7 @@ function user_form_test_current_password($form, &$form_state, $account) { '#description' => t('A field that would require a correct password to change.'), '#required' => TRUE, ); - + $form['current_pass'] = array( '#type' => 'password', '#title' => t('Current password'), diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index afaddeb..5cefc51 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -349,7 +349,7 @@ function user_admin_settings() { ); // If picture support is enabled, check whether the picture directory exists. if (variable_get('user_pictures', 0)) { - $picture_path = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); + $picture_path = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); if (!file_prepare_directory($picture_path, FILE_CREATE_DIRECTORY)) { form_set_error('user_picture_path', t('The directory %directory does not exist or is not writable.', array('%directory' => $picture_path))); watchdog('file system', 'The directory %directory does not exist or is not writable.', array('%directory' => $picture_path), LOG_ERR); diff --git a/modules/user/user.api.php b/modules/user/user.api.php index 069a9f8..4620554 100644 --- a/modules/user/user.api.php +++ b/modules/user/user.api.php @@ -328,7 +328,7 @@ function hook_user_logout($account) { */ function hook_user_view($account, $view_mode, $langcode) { if (user_access('create blog content', $account)) { - $account->content['summary']['blog'] = array( + $account->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), '#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => format_username($account)))))), diff --git a/modules/user/user.module b/modules/user/user.module index ffd170c..515d4fb 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -458,7 +458,7 @@ function user_save($account, $edit = array(), $category = 'account') { // make it permanent. if (!$picture->status) { $info = image_get_info($picture->uri); - $picture_directory = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); + $picture_directory = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); // Prepare the pictures directory. file_prepare_directory($picture_directory, FILE_CREATE_DIRECTORY); diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index 0d06ff2..c617e6f 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -103,7 +103,8 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a if (!empty($reset_link_account)) { drupal_set_message(t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. Please <a href="!logout">logout</a> and try using the link again.', array('%other_user' => $user->name, '%resetting_user' => $reset_link_account->name, '!logout' => url('user/logout')))); - } else { + } + else { // Invalid one-time link specifies an unknown user. drupal_set_message(t('The one-time login link you clicked is invalid.')); } diff --git a/modules/user/user.test b/modules/user/user.test index 6ecbfac..9bd017c 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -1868,7 +1868,7 @@ class UserRoleAdminTestCase extends DrupalWebTestCase { $old_weight = $role->weight; // Change the role weight and submit the form. - $edit = array('roles['. $rid .'][weight]' => $old_weight + 1); + $edit = array('roles[' . $rid . '][weight]' => $old_weight + 1); $this->drupalPost('admin/people/permissions/roles', $edit, t('Save order')); $this->assertText(t('The role settings have been updated.'), t('The role settings form submitted successfully.')); @@ -2000,7 +2000,7 @@ class UserRolesAssignmentTestCase extends DrupalWebTestCase { * Tests that a user can be assigned a role and that the role can be removed * again. */ - function testAssignAndRemoveRole() { + function testAssignAndRemoveRole() { $rid = $this->drupalCreateRole(array('administer content types')); $account = $this->drupalCreateUser(); @@ -2081,7 +2081,7 @@ class UserAuthmapAssignmentTestCase extends DrupalWebTestCase { /** * Test authmap assignment and retrieval. */ - function testAuthmapAssignment() { + function testAuthmapAssignment() { $account = $this->drupalCreateUser(); // Assign authmaps to the user. diff --git a/scripts/drupal.sh b/scripts/drupal.sh index 5d064f5..288623b 100755 --- a/scripts/drupal.sh +++ b/scripts/drupal.sh @@ -69,10 +69,10 @@ $_SERVER['HTTP_USER_AGENT'] = 'console'; // toggle verbose mode if (in_array('--verbose', $_SERVER['argv'])) { - $_verbose_mode = true; + $_verbose_mode = TRUE; } else { - $_verbose_mode = false; + $_verbose_mode = FALSE; } // parse invocation arguments diff --git a/scripts/dump-database-d6.sh b/scripts/dump-database-d6.sh index 41146b0..b9e69a0 100644 --- a/scripts/dump-database-d6.sh +++ b/scripts/dump-database-d6.sh @@ -71,7 +71,7 @@ foreach ($schema as $table => $data) { } // Prepare the export of values. - $result = db_query('SELECT * FROM {'. $table .'}'); + $result = db_query('SELECT * FROM {' . $table . '}'); $insert = ''; while ($record = db_fetch_array($result)) { // users.uid is a serial and inserting 0 into a serial can break MySQL. @@ -80,7 +80,7 @@ foreach ($schema as $table => $data) { if ($table == 'users') { $record['uid']++; } - $insert .= '->values('. drupal_var_export($record) .")\n"; + $insert .= '->values(' . drupal_var_export($record) . ")\n"; } // Dump the values if there are some. diff --git a/scripts/password-hash.sh b/scripts/password-hash.sh index 004421a..c2f05d9 100755 --- a/scripts/password-hash.sh +++ b/scripts/password-hash.sh @@ -13,7 +13,7 @@ */ if (version_compare(PHP_VERSION, "5.2.0", "<")) { - $version = PHP_VERSION; + $version = PHP_VERSION; echo <<<EOF ERROR: This script requires at least PHP version 5.2.0. You invoked it with diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index db34924..2de6a0d 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -289,10 +289,10 @@ function simpletest_script_init($server_software) { $_SERVER['SERVER_ADDR'] = '127.0.0.1'; $_SERVER['SERVER_SOFTWARE'] = $server_software; $_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'; if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 0472f02..d22de60 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -66,17 +66,17 @@ * @endcode * * 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 + * 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 * specify a database file name in a directory that is writable by the - * webserver. For most other drivers, you must specify a + * webserver. For most other drivers, you must specify a * username, password, host, and database name. * - * Some database engines support transactions. In order to enable + * Some database engines support transactions. In order to enable * transaction support for a given database, set the 'transactions' key - * to TRUE. To disable it, set it to FALSE. Note that the default value - * varies by driver. For MySQL, the default is FALSE since MyISAM tables + * to TRUE. To disable it, set it to FALSE. Note that the default value + * varies by driver. For MySQL, the default is FALSE since MyISAM tables * do not support transactions. * * For each database, you may optionally specify multiple "target" databases. @@ -96,9 +96,9 @@ * * In the above example, $info_array is an array of settings described above. * The first line sets a "default" database that has one master database - * (the second level default). The second and third lines create an array + * (the second level default). The second and third lines create an array * of potential slave databases. Drupal will select one at random for a given - * request as needed. The fourth line creates a new database with a name of + * request as needed. The fourth line creates a new database with a name of * "extra". * * For a single database configuration, the following is sufficient: @@ -197,7 +197,7 @@ $update_free_access = FALSE; * * This variable will be set to a random value by the installer. All one-time * login links will be invalidated if the value is changed. Note that this - * variable must have the same value on every web server. If this variable is + * variable must have the same value on every web server. If this variable is * empty, a hash of the serialized database credentials will be used as a * fallback salt. * @@ -271,9 +271,9 @@ ini_set('session.cookie_lifetime', 2000000); /** * If you encounter a situation where users post a large amount of text, and * the result is stripped out upon viewing but can still be edited, Drupal's - * output filter may not have sufficient memory to process it. If you + * output filter may not have sufficient memory to process it. If you * experience this issue, you may wish to uncomment the following two lines - * and increase the limits of these variables. For more information, see + * and increase the limits of these variables. For more information, see * http://php.net/manual/en/pcre.configuration.php. */ # ini_set('pcre.backtrack_limit', 200000); diff --git a/themes/bartik/color/preview.js b/themes/bartik/color/preview.js index b40bcf7..9c0a5d9 100644 --- a/themes/bartik/color/preview.js +++ b/themes/bartik/color/preview.js @@ -8,7 +8,7 @@ $('#preview #preview-logo img').attr('src', Drupal.settings.color.logo); this.logoChanged = true; } - // Remove the logo if the setting is toggled off. + // Remove the logo if the setting is toggled off. if (Drupal.settings.color.logo == null) { $('div').remove('#preview-logo'); } diff --git a/themes/bartik/css/layout.css b/themes/bartik/css/layout.css index b561f4c..a72cf41 100644 --- a/themes/bartik/css/layout.css +++ b/themes/bartik/css/layout.css @@ -3,7 +3,7 @@ html, body, -#page { +#page { height: 100%; } #page-wrapper { diff --git a/themes/bartik/css/maintenance-page.css b/themes/bartik/css/maintenance-page.css index c13c77b..2fdec33 100644 --- a/themes/bartik/css/maintenance-page.css +++ b/themes/bartik/css/maintenance-page.css @@ -50,7 +50,7 @@ body.maintenance-page { .maintenance-page #name-and-slogan a:hover { color: #777; } -.maintenance-page h1#page-title { +.maintenance-page h1#page-title { line-height: 1em; margin-top: 0; }