diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt index a54b521..704237b 100644 --- a/MAINTAINERS.txt +++ b/MAINTAINERS.txt @@ -1,10 +1,10 @@ -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 The people listed here have agreed to do more quality assurance work for -particular areas of Drupal. All of them are subject to change. +particular areas of Drupal. All of them are subject to change. Branch maintainers diff --git a/includes/ajax.inc b/includes/ajax.inc index d70808e..674dfb6 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..fb6a420 100644 --- a/includes/archiver.inc +++ b/includes/archiver.inc @@ -14,8 +14,8 @@ interface ArchiverInterface { * Constructor for a new archiver instance. * * @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 + * 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 * appropriate. */ public function __construct($file_path); diff --git a/includes/authorize.inc b/includes/authorize.inc index 862992f..e90c3e4 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 2856529..6c3d9b6 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -43,9 +43,9 @@ define('CACHE_TEMPORARY', -1); * Logging severity levels as defined in RFC 3164. * * The WATCHDOG_* constant definitions correspond to the logging severity levels - * defined in RFC 3164, section 4.1.1. PHP supplies predefined LOG_* constants + * defined in RFC 3164, section 4.1.1. PHP supplies predefined LOG_* constants * for use in the syslog() function, but their values on Windows builds do not - * correspond to RFC 3164. The associated PHP bug report was closed with the + * correspond to RFC 3164. The associated PHP bug report was closed with the * comment, "And it's also not a bug, as Windows just have less log levels," * and "So the behavior you're seeing is perfectly normal." * @@ -1868,7 +1868,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 @@ -2368,7 +2368,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 9b60a7e..bd5812c 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -158,7 +158,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 72fcf76..24d9251 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2756,7 +2756,7 @@ function drupal_add_html_head_link($attributes, $header = FALSE) { * See 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 @@ -3373,7 +3373,7 @@ function drupal_pre_render_styles($elements) { * in $css while the value is the cache file name. The cache file is generated * in two cases. First, if there is no file name value for the key, which will * happen if a new file name has been added to $css or after the lookup - * variable is emptied to force a rebuild of the cache. Second, the cache + * variable is emptied to force a rebuild of the cache. Second, the cache * file is generated if it is missing on disk. Old cache files are not deleted * immediately when the lookup variable is emptied, but are deleted after a set * period by drupal_delete_file_if_stale(). This ensures that files referenced @@ -3600,12 +3600,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); } /** @@ -3803,7 +3803,7 @@ function drupal_region_class($region) { * to tell the user that a new message arrived, by opening a pop up, alert * box, etc.). This should only be used for JavaScript that cannot be executed * from a file. When adding inline code, make sure that you are not relying on - * $() being the jQuery function. Wrap your code in + * $() being the jQuery function. Wrap your code in * @code (function ($) {... })(jQuery); @endcode * or use jQuery() instead of $(). * - Add external JavaScript ('external'): Allows the inclusion of external @@ -3923,7 +3923,7 @@ function drupal_region_class($region) { * happened later in the page request gets added to the page after one for * which drupal_add_js() happened earlier in the page request. * - defer: If set to TRUE, the defer attribute is set on the <script> - * tag. Defaults to FALSE. + * tag. Defaults to FALSE. * - cache: If set to FALSE, the JavaScript file is loaded anew on every page * call; in other words, it is not cached. Used only when 'type' references * a JavaScript file. Defaults to TRUE. @@ -4144,7 +4144,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': @@ -4236,7 +4236,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 @@ -4730,7 +4730,7 @@ function drupal_add_tabledrag($table_id, $action, $relationship, $group, $subgro * $files while the value is the cache file name. The cache file is generated * in two cases. First, if there is no file name value for the key, which will * happen if a new file name has been added to $files or after the lookup - * variable is emptied to force a rebuild of the cache. Second, the cache + * variable is emptied to force a rebuild of the cache. Second, the cache * file is generated if it is missing on disk. Old cache files are not deleted * immediately when the lookup variable is emptied, but are deleted after a set * period by drupal_delete_file_if_stale(). This ensures that files referenced @@ -7779,7 +7779,7 @@ function archiver_get_extensions() { * Create the appropriate archiver for the specified file. * * @param $file - * The full path of the archive file. Note that stream wrapper + * The full path of the archive file. Note that stream wrapper * paths are supported, but not remote ones. * @return * A newly created instance of the archiver class appropriate diff --git a/includes/database/database.inc b/includes/database/database.inc index 6108614..70f8ae0 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -5,7 +5,7 @@ * Core systems for the database layer. * * Classes required for basic functioning of the database system should be - * placed in this file. All utility functions should also be placed in this + * placed in this file. All utility functions should also be placed in this * file only, as they cannot auto-load the way classes can. */ @@ -120,8 +120,8 @@ * Drupal also supports transactions, including a transparent fallback for * 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 + * 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 * 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. @@ -151,7 +151,7 @@ * watchdog_exception('type', $e); * } * - * // $txn goes out of scope here. Unless the transaction was rolled back, it + * // $txn goes out of scope here. Unless the transaction was rolled back, it * // gets automatically commited here. * } * @@ -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. * @@ -719,9 +719,9 @@ 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 + // a duplicate key. We do not account for that as the calling code // is already broken if that happens. $new_keys[$key . '_' . $i] = $value; } @@ -1680,7 +1680,7 @@ abstract class Database { * Closes a connection to the server specified by the given key and target. * * @param $target - * The database target name. Defaults to NULL meaning that all target + * The database target name. Defaults to NULL meaning that all target * connections will be closed. * @param $key * The database connection key. Defaults to NULL which means the active key. @@ -1776,7 +1776,7 @@ class DatabaseTransactionOutOfOrderException 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 {} @@ -2195,9 +2195,9 @@ 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 + * database. Calling code can then treat it the same as if it were an actual * result set that happens to contain no records. * * @see SearchQuery @@ -2653,7 +2653,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/database.inc b/includes/database/mysql/database.inc index 7d5d859..429dc10 100644 --- a/includes/database/mysql/database.inc +++ b/includes/database/mysql/database.inc @@ -115,7 +115,7 @@ class DatabaseConnection_mysql extends DatabaseConnection { public function nextIdDelete() { // While we want to clean up the table to keep it up from occupying too // much storage and memory, we must keep the highest value in the table - // because InnoDB uses an in-memory auto-increment counter as long as the + // because InnoDB uses an in-memory auto-increment counter as long as the // server runs. When the server is stopped and restarted, InnoDB // reinitializes the counter for each table for the first INSERT to the // table based solely on values from the table so deleting all values would 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 c7363f2..a40c356 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. * @@ -277,14 +277,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; @@ -798,7 +798,7 @@ class DeleteQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -1047,7 +1047,7 @@ class UpdateQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -1539,7 +1539,7 @@ class MergeQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -1756,14 +1756,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/schema.inc b/includes/database/schema.inc index 41c6802..0cbc3c7 100644 --- a/includes/database/schema.inc +++ b/includes/database/schema.inc @@ -109,17 +109,17 @@ require_once __DIR__ . '/query.inc'; * 'description' => 'The base table for nodes.', * 'fields' => array( * 'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - * 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,'default' => 0), - * 'type' => array('type' => 'varchar','length' => 32,'not null' => TRUE, 'default' => ''), - * 'language' => array('type' => 'varchar','length' => 12,'not null' => TRUE,'default' => ''), - * 'title' => array('type' => 'varchar','length' => 255,'not null' => TRUE, 'default' => ''), + * 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + * 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), + * 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), + * 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), * 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 1), * 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'comment' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'promote' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'moderate' => array('type' => 'int', 'not null' => TRUE,'default' => 0), + * 'moderate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'sticky' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'tnid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), * 'translate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), diff --git a/includes/database/select.inc b/includes/database/select.inc index 7504778..a33b6ed 100644 --- a/includes/database/select.inc +++ b/includes/database/select.inc @@ -10,11 +10,11 @@ require_once __DIR__ . '/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 + * operations. Subclasses of this class may implement additional methods or + * override existing methods as appropriate. Extenders may also wrap other * extender objects, allowing for arbitrarily complex "enhanced" queries. */ interface QueryExtendableInterface { @@ -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. */ @@ -712,7 +712,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; @@ -836,7 +836,7 @@ class SelectQueryExtender implements SelectQueryInterface { $this->query->notExists($select); return $this; } - + public function __toString() { return (string) $this->query; } @@ -845,7 +845,7 @@ class SelectQueryExtender implements SelectQueryInterface { $this->uniqueIdentifier = uniqid('', TRUE); // We need to deep-clone the query we're wrapping, which in turn may - // deep-clone other objects. Exciting! + // deep-clone other objects. $this->query = clone($this->query); } @@ -853,18 +853,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; @@ -1088,7 +1088,7 @@ class SelectQuery extends Query implements SelectQueryInterface { $this->where->notExists($select); return $this; } - + public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) { $this->where->compile($connection, $queryPlaceholder); $this->having->compile($connection, $queryPlaceholder); @@ -1172,17 +1172,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; @@ -1454,7 +1454,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) { @@ -1554,7 +1554,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']; diff --git a/includes/database/sqlite/database.inc b/includes/database/sqlite/database.inc index 0fc0b55..727819a 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 99baf49..fbe3003 100644 --- a/includes/entity.inc +++ b/includes/entity.inc @@ -739,7 +739,7 @@ class EntityFieldQuery { * two columns, 'color' and 'shape', and for entity id 1, there are two * values: red/square and blue/circle. Entity ID 1 does not have values * corresponding to 'red circle', however if you pass 'red' and 'circle' as - * conditions, it will appear in the results - by default queries will run + * conditions, it will appear in the results - by default queries will run * against any combination of deltas. By passing the conditions with the * same $delta_group it will ensure that only values attached to the same * delta are matched, and entity 1 would then be excluded from the results. @@ -941,7 +941,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. @@ -976,7 +976,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 84e9c77..5dc1c8a 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 6e2e5cb..8dd8e4c 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -485,7 +485,7 @@ function file_save_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. @@ -1707,7 +1707,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))); diff --git a/includes/filetransfer/ftp.inc b/includes/filetransfer/ftp.inc index 838dc7c..a85831d 100644 --- a/includes/filetransfer/ftp.inc +++ b/includes/filetransfer/ftp.inc @@ -82,11 +82,11 @@ class FileTransferFTPExtension extends FileTransferFTP implements FileTransferCh if (!$list) { $list = array(); } - foreach ($list as $item){ + foreach ($list as $item) { 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 decca00..d929307 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -380,7 +380,7 @@ function form_state_defaults() { 'submitted' => FALSE, 'executed' => FALSE, 'programmed' => FALSE, - 'cache'=> FALSE, + 'cache' => FALSE, 'method' => 'post', 'groups' => array(), 'buttons' => array(), @@ -2412,7 +2412,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 @@ -2738,14 +2738,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'], @@ -3152,11 +3152,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 1040bf3..a9f476f 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 089cdee..8ffba35 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 7272df9..df777a1 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 @@ -288,7 +288,7 @@ interface MailSystemInterface { * E-mail bodies must be wrapped. You can use drupal_wrap_mail() for * smart plain text wrapping. * - headers: Associative array containing all additional mail headers not - * defined by one of the other parameters. PHP's mail() looks for Cc + * defined by one of the other parameters. PHP's mail() looks for Cc * and Bcc headers and sends the mail to addresses in these headers too. * * @return diff --git a/includes/menu.inc b/includes/menu.inc index 0e3f5b6..b48faef 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). @@ -3430,7 +3430,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 7a3a7be..e1bd386 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. * diff --git a/includes/password.inc b/includes/password.inc index a4b9633..7c97287 100644 --- a/includes/password.inc +++ b/includes/password.inc @@ -142,7 +142,7 @@ function _password_enforce_log2_boundaries($count_log2) { * @param $password * The plain-text password to hash. * @param $setting - * An existing hash or the output of _password_generate_salt(). Must be + * An existing hash or the output of _password_generate_salt(). Must be * at least 12 characters (the settings and salt). * * @return @@ -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 9a9b061..f2e313a 100644 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -12,7 +12,7 @@ * * Note that PHP 5.2 fopen() only supports URIs of the form "scheme://target" * despite the fact that according to RFC 3986 a URI's scheme component - * delimiter is in general just ":", not "://". Because of this PHP limitation + * delimiter is in general just ":", not "://". Because of this PHP limitation * and for consistency Drupal will only accept URIs of form "scheme://target". * * @see http://www.faqs.org/rfcs/rfc3986.html diff --git a/includes/theme.inc b/includes/theme.inc index 3287073..437b03b 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -385,7 +385,7 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) { foreach ($result as $hook => $info) { // When a theme or engine overrides a module's theme function // $result[$hook] will only contain key/value pairs for information being - // overridden. Pull the rest of the information from what was defined by + // overridden. Pull the rest of the information from what was defined by // an earlier hook. // Fill in the type and path of the module, theme, or engine that diff --git a/includes/update.inc b/includes/update.inc index cbee34e..a12341a 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -23,7 +23,7 @@ define('REQUIRED_D7_SCHEMA_VERSION', '7069'); */ function update_fix_compatibility() { $incompatible = array(); - $result = db_query("SELECT name, type, status FROM {system} WHERE status = 1 AND type IN ('module','theme')"); + $result = db_query("SELECT name, type, status FROM {system} WHERE status = 1 AND type IN ('module', 'theme')"); foreach ($result as $row) { if (update_check_incompatibility($row->name, $row->type)) { $incompatible[] = $row->name; diff --git a/includes/updater.inc b/includes/updater.inc index 363c6eb..92df8b3 100644 --- a/includes/updater.inc +++ b/includes/updater.inc @@ -127,7 +127,7 @@ class Updater { * * Since there is no enforcement of which info file is the project's "main" * info file, this will get one with the same name as the directory, or the - * first one it finds. Not ideal, but needs a larger solution. + * first one it finds. Not ideal, but needs a larger solution. * * @param string $directory * Directory to search in. 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 b9b5822..301a2fa 100644 --- a/misc/tabledrag.js +++ b/misc/tabledrag.js @@ -797,8 +797,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/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.module b/modules/block/block.module index 86e1ca7..cbde7db 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -422,7 +422,7 @@ function _block_rehash($theme = NULL) { // {block}.pages is type 'text', so it cannot have a // default value, and not null, so we need to provide // value if the module did not. - $block['pages'] = ''; + $block['pages'] = ''; } // Make sure weight is set. if (!isset($block['weight'])) { @@ -523,7 +523,7 @@ function block_custom_block_form($edit = array()) { * @param $edit * Associative array of fields to save. Array keys: * - info: Block description. - * - body: Associative array of body value and format. Array keys: + * - body: Associative array of body value and format. Array keys: * - value: Block contents. * - format: Filter ID of the filter format for the body. * @param $delta diff --git a/modules/block/block.test b/modules/block/block.test index 2166687..0c3ad08 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -193,7 +193,7 @@ class BlockTestCase extends DrupalWebTestCase { } /** - * Test block visibility when using "pages" restriction but leaving + * Test block visibility when using "pages" restriction but leaving * "pages" textarea empty */ function testBlockVisibilityListedEmpty() { @@ -463,7 +463,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/book/book.module b/modules/book/book.module index 6e74d32..a0de155 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -1047,11 +1047,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 7665631..7eff863 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 @@ -315,7 +315,7 @@ function color_scheme_form_submit($form, &$form_state) { // size (both at 32bpp). $required = $width * $height * 8; // We intend to prevent color scheme changes if there isn't enough memory - // available. memory_get_usage(TRUE) returns a more accurate number than + // available memory_get_usage(TRUE) returns a more accurate number than // memory_get_usage(), therefore we won't inadvertently reject a color // scheme change based on a faulty memory calculation. $usage = memory_get_usage(TRUE); 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 37a208f..b52204a 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', @@ -542,7 +542,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 @@ -575,7 +575,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) { @@ -1439,7 +1439,7 @@ function comment_save($comment) { $transaction = db_transaction(); try { - $defaults = array( + $defaults = array( 'mail' => '', 'homepage' => '', 'name' => '', @@ -1711,7 +1711,7 @@ function comment_num_new($nid, $timestamp = 0) { $timestamp = ($timestamp > NODE_NEW_LIMIT ? $timestamp : NODE_NEW_LIMIT); // Use the timestamp to retrieve the number of new comments. - return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND created > :timestamp AND status = :status', array( + return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND created > :timestamp AND status = :status', array( ':nid' => $nid, ':timestamp' => $timestamp, ':status' => COMMENT_PUBLISHED, @@ -2279,10 +2279,10 @@ function template_preprocess_comment(&$variables) { // Set status to a string representation of comment->status. if (isset($comment->in_preview)) { - $variables['status'] = 'comment-preview'; + $variables['status'] = 'comment-preview'; } else { - $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published'; + $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published'; } // Gather comment classes. if ($comment->uid === 0) { diff --git a/modules/comment/comment.test b/modules/comment/comment.test index e5cae5e..9e30261 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -1,7 +1,7 @@ cid; + $url_options['fragment'] = 'comment-' . $comment->cid; $replacements[$original] = url('comment/' . $comment->cid, $url_options); break; @@ -225,7 +225,7 @@ function comment_tokens($type, $tokens, array $data = array(), array $options = $node = $data['node']; foreach ($tokens as $name => $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.admin.inc b/modules/dblog/dblog.admin.inc index b2da7ed..063eb97 100644 --- a/modules/dblog/dblog.admin.inc +++ b/modules/dblog/dblog.admin.inc @@ -113,7 +113,7 @@ function dblog_top($type) { $rows[] = array($dblog->count, theme('dblog_message', array('event' => $dblog))); } - $build['dblog_top_table'] = array( + $build['dblog_top_table'] = array( '#theme' => 'table', '#header' => $header, '#rows' => $rows, diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test index ffd3e8a..724d591 100644 --- a/modules/dblog/dblog.test +++ b/modules/dblog/dblog.test @@ -470,7 +470,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/field.api.php b/modules/field/field.api.php index 88f9231..122de95 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -899,7 +899,7 @@ function hook_field_widget_form_alter(&$element, &$form_state, $context) { * @see hook_field_widget_form_alter() */ function hook_field_widget_WIDGET_TYPE_form_alter(&$element, &$form_state, $context) { - // Code here will only act on widgets of type WIDGET_TYPE. For example, + // Code here will only act on widgets of type WIDGET_TYPE. For example, // hook_field_widget_mymodule_autocomplete_form_alter() will only act on // widgets of type 'mymodule_autocomplete'. $element['#autocomplete_path'] = 'mymodule/autocomplete_path'; diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc index cc8dac5..0cd1b4d 100644 --- a/modules/field/field.info.inc +++ b/modules/field/field.info.inc @@ -18,7 +18,7 @@ /** * Clears the field info cache without clearing the field data cache. * - * This is useful when deleted fields or instances are purged. We + * This is useful when deleted fields or instances are purged. We * need to remove the purged records, but no actual field data items * are affected. */ 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( @@ -493,7 +493,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' => '
 
', @@ -541,7 +541,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.api.php b/modules/field_ui/field_ui.api.php index b644652..2340125 100644 --- a/modules/field_ui/field_ui.api.php +++ b/modules/field_ui/field_ui.api.php @@ -82,7 +82,7 @@ function hook_field_instance_settings_form($field, $instance) { t('No'), t('Yes'), ), - '#description' => t('Display the summary to allow the user to input a summary value. Hide the summary to automatically fill it with a trimmed portion from the main post. '), + '#description' => t('Display the summary to allow the user to input a summary value. Hide the summary to automatically fill it with a trimmed portion from the main post.'), '#default_value' => !empty($settings['display_summary']) ? $settings['display_summary'] : 0, ); } diff --git a/modules/field_ui/field_ui.module b/modules/field_ui/field_ui.module index dfca8cf..df6aa74 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['triggering_element']['#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 9ff6c17..cce43d7 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,8 +147,8 @@ 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 = 'field_'. $this->field_name_input; + $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); @@ -615,7 +615,7 @@ class FieldUIManageDisplayTestCase extends FieldUITestCase { $clone = clone $node; $element = node_view($clone, $view_mode); $output = drupal_render($element); - $this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '
'. $output); + $this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '
' . $output); // Assign content so that DrupalWebTestCase functions can be used. $this->drupalSetContent($output); diff --git a/modules/filter/filter.module b/modules/filter/filter.module index a3f787e..5127fef 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -783,7 +783,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'; @@ -1086,7 +1086,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(); @@ -1532,7 +1532,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 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('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/locale/locale.test b/modules/locale/locale.test index 425f68c..eeb162c 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -357,7 +357,7 @@ class LocaleTranslationFunctionalTest extends DrupalWebTestCase { $query->addExpression('min(l.lid)', 'lid'); $result = $query->condition('l.location', '%.js%', 'LIKE')->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. @@ -1011,7 +1011,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')); @@ -1725,7 +1725,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, @@ -2368,7 +2368,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')); @@ -2400,7 +2400,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 b29d665..a389b84 100644 --- a/modules/locale/tests/locale_test.module +++ b/modules/locale/tests/locale_test.module @@ -59,7 +59,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 91229b4..0de1700 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/menu/menu.test b/modules/menu/menu.test index d1f16f6..883f536 100644 --- a/modules/menu/menu.test +++ b/modules/menu/menu.test @@ -67,7 +67,7 @@ class MenuTestCase extends DrupalWebTestCase { $item = menu_link_load($item['mlid']); // Verify that a change to the description is saved. $description = $this->randomName(16); - $item['options']['attributes']['title'] = $description; + $item['options']['attributes']['title'] = $description; menu_link_save($item); $saved_item = menu_link_load($item['mlid']); $this->assertEqual($description, $saved_item['options']['attributes']['title'], t('Saving an existing link updates the description (title attribute)')); diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index d58bc31..14decbf 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -159,7 +159,7 @@ function node_type_form($form, &$form_state, $type = NULL) { DRUPAL_REQUIRED => t('Required'), ), ); - $form['submission']['help'] = array( + $form['submission']['help'] = array( '#type' => 'textarea', '#title' => t('Explanation or submission guidelines'), '#default_value' => $type->help, diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index a6abb0b..9f3d688 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -419,7 +419,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 7ac62f8..f12f3d4 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 @@ -731,7 +731,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(). * @@ -823,7 +823,7 @@ function hook_node_view($node, $view_mode, $langcode) { * * If the module wishes to act on the rendered HTML of the node rather than the * structured content array, it may use this hook to add a #post_render - * callback. Alternatively, it could also implement hook_preprocess_node(). See + * callback. Alternatively, it could also implement hook_preprocess_node(). See * drupal_render() and theme() documentation respectively for details. * * @param $build @@ -1207,7 +1207,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 92c6795..27f90f5 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2139,7 +2139,8 @@ function node_block_view($delta = '') { '#theme' => 'node_recent_block', '#nodes' => $nodes, ); - } else { + } + else { $block['content'] = t('No content available.'); } } @@ -2914,7 +2915,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; @@ -3873,7 +3874,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 5de6081..51a0388 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -1719,7 +1719,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"); @@ -2089,7 +2089,7 @@ class NodeQueryAlter extends DrupalWebTestCase { * Lower-level test of 'node_access' query alter override. * * Verifies that node_access_view_all_nodes() is called from - * node_query_node_access_alter(). We do this by checking that + * node_query_node_access_alter(). We do this by checking that * a user which normally would not have view privileges is able * to view the nodes when we add a record to {node_access} paired * with a corresponding privilege in hook_node_grants(). @@ -2123,7 +2123,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 2bf891a..f5d7d9b 100644 --- a/modules/openid/openid.module +++ b/modules/openid/openid.module @@ -730,7 +730,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, @@ -740,10 +740,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 @@ -960,7 +960,7 @@ function openid_verify_assertion_nonce($service, $response) { /** * Verify that openid.return_to matches the current URL. * - * See OpenID Authentication 2.0, section 11.1. While OpenID Authentication + * See OpenID Authentication 2.0, section 11.1. While OpenID Authentication * 1.1, section 4.3 does not mandate return_to verification, the received * return_to should still match these constraints. * @@ -978,7 +978,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/path/path.module b/modules/path/path.module index 332287d..d46e77c 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -17,7 +17,7 @@ function path_help($path, $arg) { $output .= '<h3>' . t('Uses') . '</h3>'; $output .= '<dl>'; $output .= '<dt>' . t('Creating aliases') . '</dt>'; - $output .= '<dd>' . t('Users with sufficient <a href="@permissions">permissions</a> can create aliases under the <em>URL path settings</em> section when they create or edit content. Some examples of aliases are: ', array('@permissions' => url('admin/people/permissions', array('fragment' => 'module-path')))); + $output .= '<dd>' . t('Users with sufficient <a href="@permissions">permissions</a> can create aliases under the <em>URL path settings</em> section when they create or edit content. Some examples of aliases are:', array('@permissions' => url('admin/people/permissions', array('fragment' => 'module-path')))); $output .= '<ul><li>' . t('<em>member/jane-smith</em> aliased to internal path <em>user/123</em>') . '</li>'; $output .= '<li>' . t('<em>about-us/team</em> aliased to internal path <em>node/456</em>') . '</li>'; $output .= '</ul></dd>'; diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 2737c2b..a25b19f 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -628,8 +628,8 @@ function poll_block_latest_poll_view($node) { $output = ''; // 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 + // 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 // 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 7586235..f7cb29b 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 949452a..832582b 100644 --- a/modules/search/search-result.tpl.php +++ b/modules/search/search-result.tpl.php @@ -54,7 +54,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..fea7595 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 833ea8b..1dc7b8f 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 488a45e..ceb9d6a 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); - + } /** @@ -1105,7 +1106,7 @@ class SearchSimplifyTestCase extends DrupalWebTestCase { // boundary characters, and the odd lines are valid word characters. (It // was generated as a sequence of all the Unicode characters, and then the // boundary chararacters (punctuation, spaces, etc.) were split off into - // their own lines). So the even-numbered lines should simplify to nothing, + // their own lines). So the even-numbered lines should simplify to nothing, // and the odd-numbered lines we need to split into shorter chunks and // verify that simplification doesn't lose any characters. $input = file_get_contents(DRUPAL_ROOT . '/modules/search/tests/UnicodeTest.txt'); diff --git a/modules/shortcut/shortcut.test b/modules/shortcut/shortcut.test index 75a5a67..592dd40 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 @@ -141,7 +141,7 @@ class ShortcutLinksTestCase extends ShortcutTestCase { $this->assertResponse(200); $saved_set = shortcut_set_load($set->set_name); $paths = $this->getShortcutInformation($saved_set, 'link_path'); - $this->assertTrue(in_array(drupal_get_normal_path($test['path']), $paths), 'Shortcut created: '. $test['path']); + $this->assertTrue(in_array(drupal_get_normal_path($test['path']), $paths), 'Shortcut created: ' . $test['path']); $this->assertLink($title, 0, 'Shortcut link found on the page.'); } } @@ -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/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 3ce06d5..a1cc348 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1086,7 +1086,7 @@ class DrupalWebTestCase extends DrupalTestCase { * @param $permissions * Array of permission names to assign to role. * @param $name - * (optional) String for the name of the role. Defaults to a random string. + * (optional) String for the name of the role. Defaults to a random string. * @return * Role ID of newly created role, or FALSE if role creation failed. */ diff --git a/modules/simpletest/simpletest.test b/modules/simpletest/simpletest.test index e5b6042..0e91ba9 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]); @@ -406,7 +406,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, @@ -433,7 +433,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), @@ -468,7 +468,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 f668e52..ea25368 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/batch_test.callbacks.inc b/modules/simpletest/tests/batch_test.callbacks.inc index 75e6655..ea3fa69 100644 --- a/modules/simpletest/tests/batch_test.callbacks.inc +++ b/modules/simpletest/tests/batch_test.callbacks.inc @@ -82,7 +82,7 @@ function _batch_test_finished_helper($batch_id, $success, $results, $operations) $messages = array("results for batch $batch_id"); if ($results) { foreach ($results as $op => $op_results) { - $messages[] = 'op '. $op . ': processed ' . count($op_results) . ' elements'; + $messages[] = 'op ' . $op . ': processed ' . count($op_results) . ' elements'; } } else { diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 5f69673..d2f78ce 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -1111,7 +1111,7 @@ class DrupalGotoTest extends DrupalWebTestCase { $destination = 'common-test/drupal_goto/destination?foo=%2525&bar=123'; $this->drupalGet('common-test/drupal_goto/redirect', array('query' => array('destination' => $destination))); $this->assertText('drupal_goto', t('Drupal goto redirect with destination succeeded.')); - $this->assertEqual($this->getUrl(), url('common-test/drupal_goto/destination', array('query' => array('foo' => '%25', 'bar' => '123'), 'absolute' => TRUE)), t('Drupal goto redirected to given query string destination. ')); + $this->assertEqual($this->getUrl(), url('common-test/drupal_goto/destination', array('query' => array('foo' => '%25', 'bar' => '123'), 'absolute' => TRUE)), t('Drupal goto redirected to given query string destination.')); } /** @@ -1554,7 +1554,7 @@ class DrupalRenderTestCase extends DrupalWebTestCase { $request_method = $_SERVER['REQUEST_METHOD']; $_SERVER['REQUEST_METHOD'] = 'GET'; - // Create an element with a child and subchild. Each element loads a + // Create an element with a child and subchild. Each element loads a // different JavaScript file using #attached. $parent_js = drupal_get_path('module', 'user') . '/user.js'; $child_js = drupal_get_path('module', 'forum') . '/forum.js'; @@ -1727,8 +1727,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 76ca103..bc63341 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/entity_query.test b/modules/simpletest/tests/entity_query.test index fb95518..547f775 100644 --- a/modules/simpletest/tests/entity_query.test +++ b/modules/simpletest/tests/entity_query.test @@ -1492,7 +1492,7 @@ class EntityFieldQueryTestCase extends DrupalWebTestCase { $this->assertEqual($results, $intended_results, $message); } catch (Exception $e) { - $this->fail('Exception thrown: '. $e->getMessage()); + $this->fail('Exception thrown: ' . $e->getMessage()); } } } diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test index 3633bae..5abc810 100644 --- a/modules/simpletest/tests/file.test +++ b/modules/simpletest/tests/file.test @@ -2464,7 +2464,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 b3c43e0..1b11316 100644 --- a/modules/simpletest/tests/file_test.module +++ b/modules/simpletest/tests/file_test.module @@ -138,7 +138,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 71187b5..c06a286 100644 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -545,7 +545,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 3c0952b..9825061 100644 --- a/modules/simpletest/tests/menu.test +++ b/modules/simpletest/tests/menu.test @@ -847,22 +847,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() { @@ -872,7 +872,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 f1e1bd5..741650e 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -120,7 +120,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.')); @@ -133,7 +133,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 6824f19..ed759a4 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -799,7 +799,7 @@ function system_modules($form, $form_state = array()) { $extra['enabled'] = (bool) $module->status; if (!empty($module->info['required'] )) { $extra['disabled'] = TRUE; - $extra['required_by'][] = $distribution_name . (!empty($module->info['explanation']) ? ' ('. $module->info['explanation'] .')' : ''); + $extra['required_by'][] = $distribution_name . (!empty($module->info['explanation']) ? ' (' . $module->info['explanation'] . ')' : ''); } // If this module requires other modules, add them to the array. @@ -965,7 +965,7 @@ function _system_modules_build_row($info, $extra) { // Check the core compatibility. if (!isset($info['core']) || $info['core'] != DRUPAL_CORE_COMPATIBILITY) { $compatible = FALSE; - $status_short .= t('Incompatible with this version of Drupal core. '); + $status_short .= t('Incompatible with this version of Drupal core.'); $status_long .= t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => DRUPAL_CORE_COMPATIBILITY)); } @@ -1093,7 +1093,7 @@ function system_modules_submit($form, &$form_state) { $missing_modules = array(); foreach ($modules as $name => $module) { if ($module['enabled']) { - // Checks that all dependencies are set to be enabled. Stores the ones + // Checks that all dependencies are set to be enabled. Stores the ones // that are not in $dependencies variable so that the user can be alerted // in the confirmation form that more modules need to be enabled. $dependencies = array(); @@ -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. @@ -1480,7 +1480,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['front_page']['default_nodes_main'] = array( @@ -1489,7 +1489,7 @@ function system_site_information_settings() { '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)), '#description' => t('The maximum number of posts displayed on overview pages such as the front page.'), '#access' => (variable_get('site_frontpage')=='node'), - ); + ); $form['error_page'] = array( '#type' => 'fieldset', '#title' => t('Error pages'), @@ -1562,7 +1562,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', @@ -1913,7 +1913,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 @@ -2683,7 +2683,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) { @@ -2697,7 +2697,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 ec7f6b8..917c1bb 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -2246,14 +2246,14 @@ function hook_xmlrpc_alter(&$methods) { * - ip: The IP address where the request for the page came from. * - timestamp: The UNIX timestamp of the date/time the event occurred * - severity: One of the following values as defined in RFC 3164 http://www.faqs.org/rfcs/rfc3164.html - * WATCHDOG_EMERGENCY Emergency: system is unusable - * WATCHDOG_ALERT Alert: action must be taken immediately - * WATCHDOG_CRITICAL Critical: critical conditions - * WATCHDOG_ERROR Error: error conditions - * WATCHDOG_WARNING Warning: warning conditions - * WATCHDOG_NOTICE Notice: normal but significant condition - * WATCHDOG_INFO Informational: informational messages - * WATCHDOG_DEBUG Debug: debug-level messages + * WATCHDOG_EMERGENCY Emergency: system is unusable + * WATCHDOG_ALERT Alert: action must be taken immediately + * WATCHDOG_CRITICAL Critical: critical conditions + * WATCHDOG_ERROR Error: error conditions + * WATCHDOG_WARNING Warning: warning conditions + * WATCHDOG_NOTICE Notice: normal but significant condition + * WATCHDOG_INFO Informational: informational messages + * WATCHDOG_DEBUG Debug: debug-level messages * - link: an optional link provided by the module that called the watchdog() function. * - message: The text of the message to be logged. */ @@ -2261,10 +2261,10 @@ function hook_watchdog(array $log_entry) { global $base_url, $language; $severity_list = array( - WATCHDOG_EMERGENCY => t('Emergency'), + WATCHDOG_EMERGENCY => t('Emergency'), WATCHDOG_ALERT => t('Alert'), - WATCHDOG_CRITICALI => t('Critical'), - WATCHDOG_ERROR => t('Error'), + WATCHDOG_CRITICALI => t('Critical'), + WATCHDOG_ERROR => t('Error'), WATCHDOG_WARNING => t('Warning'), WATCHDOG_NOTICE => t('Notice'), WATCHDOG_INFO => t('Info'), @@ -2737,7 +2737,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 @@ -3736,8 +3736,8 @@ function hook_action_info_alter(&$actions) { * Declare archivers to the system. * * An archiver is a class that is able to package and unpackage one or more files - * into a single possibly compressed file. Common examples of such files are - * zip files and tar.gz files. All archiver classes must implement + * into a single possibly compressed file. Common examples of such files are + * zip files and tar.gz files. All archiver classes must implement * ArchiverInterface. * * Each entry should be keyed on a unique value, and specify three diff --git a/modules/system/system.install b/modules/system/system.install index 6d80c43..dcb60b7 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 16ed0b5..7feaca4 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -89,7 +89,7 @@ function system_help($path, $arg) { case 'admin/index': return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>'; case 'admin/appearance': - $output = '<p>' . t('Set and configure the default theme for your website. Alternative <a href="@themes">themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) . '</p>'; + $output = '<p>' . t('Set and configure the default theme for your website. Alternative <a href="@themes">themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) . '</p>'; return $output; case 'admin/appearance/settings/' . $arg[3]: $theme_list = list_themes(); @@ -1888,14 +1888,14 @@ 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 // server for that user temporarily to allow the slave server to catch up. // That way, that user will see their changes immediately while for other // users we still get the benefits of having a slave server, just with slightly - // stale data. Code that wants to disable the slave server should use the + // stale data. Code that wants to disable the slave server should use the // db_set_ignore_slave() function to set $_SESSION['ignore_slave_server'] to // the timestamp after which the slave can be re-enabled. if (isset($_SESSION['ignore_slave_server'])) { diff --git a/modules/system/system.test b/modules/system/system.test index 846653b..c9dbe66 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1053,7 +1053,7 @@ class SiteMaintenanceTestCase extends DrupalWebTestCase { ); $this->drupalPost('user/password', $edit, t('E-mail new password')); $mails = $this->drupalGetMails(); - $start = strpos($mails[0]['body'], 'user/reset/'. $this->user->uid); + $start = strpos($mails[0]['body'], 'user/reset/' . $this->user->uid); $path = substr($mails[0]['body'], $start, 66 + strlen($this->user->uid)); // Log in with temporary login link. @@ -2445,7 +2445,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.admin.inc b/modules/taxonomy/taxonomy.admin.inc index a236cfe..1010f76 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -550,8 +550,8 @@ function theme_taxonomy_overview_terms($variables) { $page_increment = $form['#page_increment']; $page_entries = $form['#page_entries']; - $back_step = $form['#back_step']; - $forward_step = $form['#forward_step']; + $back_step = $form['#back_step']; + $forward_step = $form['#forward_step']; // Add drag and drop if parent fields are present in the form. if ($form['#parent_fields']) { @@ -570,7 +570,7 @@ function theme_taxonomy_overview_terms($variables) { $term = &$form[$key]; $row = array(); - $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', array('size' => $term['#term']['depth'])) : ''). drupal_render($term['view']); + $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', array('size' => $term['#term']['depth'])) : '') . drupal_render($term['view']); if ($form['#parent_fields']) { $term['tid']['#attributes']['class'] = array('term-id'); $term['parent']['#attributes']['class'] = array('term-parent'); diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install index b67f18b..38c4cd9 100644 --- a/modules/taxonomy/taxonomy.install +++ b/modules/taxonomy/taxonomy.install @@ -201,7 +201,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 eb81870..1dd04d3 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>'; @@ -1495,7 +1495,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 9a89b9c..45a7aba 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -547,7 +547,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. @@ -764,7 +764,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)); } /** @@ -807,7 +807,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 4b62cde..4fce2c7 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..89123dc 100644 --- a/modules/tracker/tracker.pages.inc +++ b/modules/tracker/tracker.pages.inc @@ -54,7 +54,7 @@ function tracker_page($account = NULL, $set_title = FALSE) { if ($new = comment_num_new($node->nid)) { $comments .= '<br />'; - $comments .= l(format_plural($new, '1 new', '@count new'), 'node/'. $node->nid, array('fragment' => 'new')); + $comments .= l(format_plural($new, '1 new', '@count new'), 'node/' . $node->nid, array('fragment' => 'new')); } } @@ -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 fe320a9..b1acbf6 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 a657f91..c483ce3 100644 --- a/modules/update/update.test +++ b/modules/update/update.test @@ -7,11 +7,11 @@ * This file contains tests for the update module. The overarching methodology * of these tests is we need to compare a given state of installed modules and * themes (e.g. version, project grouping, timestamps, etc) vs. a current - * state of what the release history XML files we fetch say is available. We + * state of what the release history XML files we fetch say is available. We * have dummy XML files (in the 'tests' subdirectory) that describe various * scenarios of what's available for different test projects, and we have * dummy .info file data (specified via hook_system_info_alter() in the - * update_test helper module) describing what's currently installed. Each + * update_test helper module) describing what's currently installed. Each * test case defines a set of projects to install, their current state (via * the 'update_test_system_info' variable) and the desired available update * data (via the 'update_test_xml_map' variable), and then performs a series @@ -649,7 +649,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 4789e7e..dceea97 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), WATCHDOG_ERROR); diff --git a/modules/user/user.module b/modules/user/user.module index 1355159..4472e72 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -80,7 +80,7 @@ function user_help($path, $arg) { * be passed by reference. * * @param $type - * A text string that controls which user hook to invoke. Valid choices are: + * A text string that controls which user hook to invoke. Valid choices are: * - cancel: Invokes hook_user_cancel(). * - insert: Invokes hook_user_insert(). * - login: Invokes hook_user_login(). @@ -474,7 +474,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); @@ -2097,7 +2097,7 @@ function user_login_authenticate_validate($form, &$form_state) { // Do not allow any login from the current user's IP if the limit has been // reached. Default is 50 failed attempts allowed in one hour. This is // independent of the per-user limit to catch attempts from one IP to log - // in to many different user accounts. We have a reasonably high limit + // in to many different user accounts. We have a reasonably high limit // since there may be only one apparent IP for all users at an institution. if (!flood_is_allowed('failed_login_attempt_ip', variable_get('user_failed_login_ip_limit', 50), variable_get('user_failed_login_ip_window', 3600))) { $form_state['flood_control_triggered'] = 'ip'; diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index 02870e9..4fe4d7b 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -105,7 +105,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.')); } @@ -320,7 +321,7 @@ function user_profile_form_submit($form, &$form_state) { if ($category == 'account' && !empty($edit['pass'])) { // Remove the password reset tag since a new password was saved. - unset($_SESSION['pass_reset_'. $account->uid]); + unset($_SESSION['pass_reset_' . $account->uid]); } // Clear the page cache because pages can contain usernames and/or profile information: cache_clear_all(); 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 d39bb43..831211f 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. 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 dc4f260..e10ae37 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -284,10 +284,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..dc19f7a 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -46,7 +46,7 @@ * Database settings: * * The $databases array specifies the database connection or - * connections that Drupal may use. Drupal is able to connect + * connections that Drupal may use. Drupal is able to connect * to multiple databases, including multiple types of databases, * during the same request. * @@ -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 - * 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 + * (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 * "extra". * * For a single database configuration, the following is sufficient: @@ -196,8 +196,8 @@ $update_free_access = FALSE; * Salt for one-time login links and cancel links, form tokens, etc. * * 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 + * 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 * 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; }