diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt index 769f3cf..5661d0c 100644 --- a/MAINTAINERS.txt +++ b/MAINTAINERS.txt @@ -1,5 +1,5 @@ -Drupal core is maintained by the community. To participate, go to +Drupal core is maintained by the community. To participate, go to http://drupal.org/contribute diff --git a/includes/ajax.inc b/includes/ajax.inc index 8905687..d9bf545 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -101,7 +101,7 @@ * In the above example, the 'changethis' element is Ajax-enabled. The default * #ajax['event'] is 'change', so when the 'changethis' element changes, * an Ajax call is made. The form is submitted and reprocessed, and then the - * callback is called. In this case, the form has been automatically + * callback is called. In this case, the form has been automatically * built changing $form['replace_textfield']['#description'], so the callback * just returns that part of the form. * diff --git a/includes/archiver.inc b/includes/archiver.inc index fec053b..b35757f 100644 --- a/includes/archiver.inc +++ b/includes/archiver.inc @@ -15,7 +15,7 @@ interface ArchiverInterface { * * @param $file_path * The full system path of the archive to manipulate. Only local files - * are supported. If the file does not yet exist, it will be created if + * are supported. If the file does not yet exist, it will be created if * appropriate. */ public function __construct($file_path); diff --git a/includes/authorize.inc b/includes/authorize.inc index 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 18f44e2..6d8beda 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1595,7 +1595,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 @@ -2095,7 +2095,7 @@ function drupal_valid_test_ua() { if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^(simpletest\d+);(.+);(.+);(.+)$/", $_SERVER['HTTP_USER_AGENT'], $matches)) { list(, $prefix, $time, $salt, $hmac) = $matches; - $check_string = $prefix . ';' . $time . ';' . $salt; + $check_string = $prefix . ';' . $time . ';' . $salt; // We use the salt from settings.php to make the HMAC key, since // the database is not yet initialized and we can't access any Drupal variables. // The file properties add more entropy not easily accessible to others. diff --git a/includes/cache.inc b/includes/cache.inc index 8666874..34e616c 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -153,7 +153,7 @@ function cache_set($cid, $data, $bin = 'cache', $expire = CACHE_PERMANENT) { * * @param $wildcard * If $wildcard is TRUE, cache IDs starting with $cid are deleted in - * addition to the exact cache ID specified by $cid. If $wildcard is + * addition to the exact cache ID specified by $cid. If $wildcard is * TRUE and $cid is '*' then the entire bin $bin is emptied. */ function cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE) { diff --git a/includes/common.inc b/includes/common.inc index 8575844..f502e66 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2753,7 +2753,7 @@ function drupal_add_html_head_link($attributes, $header = FALSE) { * drupal_get_css() where the overrides are performed. Also, if the * direction of the current language is right-to-left (Hebrew, Arabic, * etc.), the function will also look for an RTL CSS file and append it to - * the list. The name of this file should have an '-rtl.css' suffix. For + * the list. The name of this file should have an '-rtl.css' suffix. For * example a CSS file called 'mymodule-name.css' will have a * 'mymodule-name-rtl.css' file added to the list, if exists in the same * directory. This CSS file should contain overrides for properties which @@ -3597,12 +3597,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); } /** @@ -4141,7 +4141,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': @@ -4233,7 +4233,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 @@ -7757,7 +7757,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 e08f907..c3e56ed 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -121,7 +121,7 @@ * databases that do not support transactions. To start a new transaction, * simply call $txn = db_transaction(); in your own code. The transaction will * remain open for as long as the variable $txn remains in scope. When $txn is - * destroyed, the transaction will be committed. If your transaction is nested + * destroyed, the transaction will be committed. If your transaction is nested * inside of another then Drupal will track each transaction and only commit * the outer-most transaction when the last transaction object goes out out of * scope, that is, all relevant queries completed successfully. @@ -194,7 +194,7 @@ abstract class DatabaseConnection extends PDO { /** * The key representing this connection. - * + * * The key is a unique string which identifies a database connection. A * connection can be a single server or a cluster of master and slaves (use * target to pick between master and slave). @@ -213,7 +213,7 @@ abstract class DatabaseConnection extends PDO { /** * Tracks the number of "layers" of transactions currently active. * - * On many databases transactions cannot nest. Instead, we track + * On many databases transactions cannot nest. Instead, we track * nested calls to transactions and collapse them into a single * transaction. * @@ -719,7 +719,7 @@ abstract class DatabaseConnection extends PDO { $new_keys = array(); foreach ($data as $i => $value) { // This assumes that there are no other placeholders that use the same - // name. For example, if the array placeholder is defined as :example + // name. For example, if the array placeholder is defined as :example // and there is already an :example_2 placeholder, this will generate // a duplicate key. We do not account for that as the calling code // is already broken if that happens. @@ -1089,7 +1089,7 @@ abstract class DatabaseConnection extends PDO { } // Commit everything since SAVEPOINT $name. - while($savepoint = array_pop($this->transactionLayers)) { + while ($savepoint = array_pop($this->transactionLayers)) { if ($savepoint != $name) continue; // If there are no more layers left then we should commit. @@ -1747,7 +1747,7 @@ class DatabaseTransactionExplicitCommitNotAllowedException extends Exception { } /** * Exception thrown for merge queries that do not make semantic sense. * - * There are many ways that a merge query could be malformed. They should all + * There are many ways that a merge query could be malformed. They should all * throw this exception and set an appropriately descriptive message. */ class InvalidMergeQueryException extends Exception {} @@ -2166,7 +2166,7 @@ class DatabaseStatementBase extends PDOStatement implements DatabaseStatementInt * Empty implementation of a database statement. * * This class satisfies the requirements of being a database statement/result - * object, but does not actually contain data. It is useful when developers + * object, but does not actually contain data. It is useful when developers * need to safely return an "empty" result set without connecting to an actual * database. Calling code can then treat it the same as if it were an actual * result set that happens to contain no records. @@ -2624,7 +2624,7 @@ function db_xor() { /** * Returns a new DatabaseCondition, set to the specified conjunction. * - * Internal API function call. The db_and(), db_or(), and db_xor() + * Internal API function call. The db_and(), db_or(), and db_xor() * functions are preferred. * * @param $conjunction diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc index 4e88fa1..5b54188 100644 --- a/includes/database/mysql/schema.inc +++ b/includes/database/mysql/schema.inc @@ -492,7 +492,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function tableExists($table) { // The information_schema table is very slow to query under MySQL 5.0. - // Instead, we try to select from the table in question. If it fails, + // Instead, we try to select from the table in question. If it fails, // the most likely reason is that it does not exist. That is dramatically // faster than using information_schema. // @link http://bugs.mysql.com/bug.php?id=19588 diff --git a/includes/database/query.inc b/includes/database/query.inc index 23b652f..f0522ad 100644 --- a/includes/database/query.inc +++ b/includes/database/query.inc @@ -77,7 +77,7 @@ interface QueryConditionInterface { /** * Sets a condition that the specified subquery returns values. - * + * * @param SelectQueryInterface $select * The subquery that must contain results. * @@ -85,10 +85,10 @@ interface QueryConditionInterface { * The called object. */ public function exists(SelectQueryInterface $select); - + /** * Sets a condition that the specified subquery returns no values. - * + * * @param SelectQueryInterface $select * The subquery that must not contain results. * @@ -96,7 +96,7 @@ interface QueryConditionInterface { * The called object. */ public function notExists(SelectQueryInterface $select); - + /** * Gets a complete list of all conditions in this conditional clause. * @@ -264,14 +264,14 @@ abstract class Query implements QueryPlaceholderInterface { /** * The target of the connection object. - * + * * @var string */ protected $connectionTarget; /** * The key of the connection object. - * + * * @var string */ protected $connectionKey; @@ -764,7 +764,7 @@ class DeleteQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -999,7 +999,7 @@ class UpdateQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -1484,7 +1484,7 @@ class MergeQuery extends Query implements QueryConditionInterface { $this->condition->notExists($select); return $this; } - + /** * Implements QueryConditionInterface::conditions(). */ @@ -1689,14 +1689,14 @@ class DatabaseCondition implements QueryConditionInterface, Countable { public function exists(SelectQueryInterface $select) { return $this->condition('', $select, 'EXISTS'); } - + /** * Implements QueryConditionInterface::notExists(). */ public function notExists(SelectQueryInterface $select) { return $this->condition('', $select, 'NOT EXISTS'); } - + /** * Implements QueryConditionInterface::conditions(). */ diff --git a/includes/database/schema.inc b/includes/database/schema.inc index de1b2f5..c5f88b1 100644 --- a/includes/database/schema.inc +++ b/includes/database/schema.inc @@ -109,10 +109,10 @@ require_once dirname(__FILE__) . '/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), diff --git a/includes/database/select.inc b/includes/database/select.inc index 53be20a..3bd4a52 100644 --- a/includes/database/select.inc +++ b/includes/database/select.inc @@ -10,8 +10,8 @@ require_once dirname(__FILE__) . '/query.inc'; /** * Interface for extendable query objects. * - * "Extenders" follow the "Decorator" OOP design pattern. That is, they wrap - * and "decorate" another object. In our case, they implement the same interface + * "Extenders" follow the "Decorator" OOP design pattern. That is, they wrap + * and "decorate" another object. In our case, they implement the same interface * as select queries and wrap a select query, to which they delegate almost all * operations. Subclasses of this class may implement additional methods or * override existing methods as appropriate. Extenders may also wrap other @@ -23,9 +23,9 @@ interface QueryExtendableInterface { * Enhance this object by wrapping it in an extender object. * * @param $extender_name - * The base name of the extending class. The base name will be checked + * The base name of the extending class. The base name will be checked * against the current database connection to allow driver-specific subclasses - * as well, using the same logic as the query objects themselves. For example, + * as well, using the same logic as the query objects themselves. For example, * PagerDefault_mysql is the MySQL-specific override for PagerDefault. * @return QueryExtendableInterface * The extender object, which now contains a reference to this object. @@ -506,7 +506,7 @@ interface SelectQueryInterface extends QueryConditionInterface, QueryAlterableIn /** * Clone magic method. * - * Select queries have dependent objects that must be deep-cloned. The + * Select queries have dependent objects that must be deep-cloned. The * connection object itself, however, should not be cloned as that would * duplicate the connection itself. */ @@ -694,7 +694,7 @@ class SelectQueryExtender implements SelectQueryInterface { public function execute() { // By calling preExecute() here, we force it to preprocess the extender - // object rather than just the base query object. That means + // object rather than just the base query object. That means // hook_query_alter() gets access to the extended object. if (!$this->preExecute($this)) { return NULL; @@ -818,7 +818,7 @@ class SelectQueryExtender implements SelectQueryInterface { $this->query->notExists($select); return $this; } - + public function __toString() { return (string) $this->query; } @@ -833,18 +833,18 @@ class SelectQueryExtender implements SelectQueryInterface { * Magic override for undefined methods. * * If one extender extends another extender, then methods in the inner extender - * will not be exposed on the outer extender. That's because we cannot know + * will not be exposed on the outer extender. That's because we cannot know * in advance what those methods will be, so we cannot provide wrapping - * implementations as we do above. Instead, we use this slower catch-all method + * implementations as we do above. Instead, we use this slower catch-all method * to handle any additional methods. */ public function __call($method, $args) { $return = call_user_func_array(array($this->query, $method), $args); // Some methods will return the called object as part of a fluent interface. - // Others will return some useful value. If it's a value, then the caller - // probably wants that value. If it's the called object, then we instead - // return this object. That way we don't "lose" an extender layer when + // Others will return some useful value. If it's a value, then the caller + // probably wants that value. If it's the called object, then we instead + // return this object. That way we don't "lose" an extender layer when // chaining methods together. if ($return instanceof SelectQueryInterface) { return $this; @@ -1040,7 +1040,7 @@ class SelectQuery extends Query implements SelectQueryInterface { $this->where->notExists($select); return $this; } - + public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) { return $this->where->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this); } @@ -1088,17 +1088,17 @@ class SelectQuery extends Query implements SelectQueryInterface { $this->having->isNotNull($field); return $this; } - + public function havingExists(SelectQueryInterface $select) { $this->having->exists($select); return $this; } - + public function havingNotExists(SelectQueryInterface $select) { $this->having->notExists($select); return $this; } - + public function forUpdate($set = TRUE) { if (isset($set)) { $this->forUpdate = $set; @@ -1395,7 +1395,7 @@ class SelectQuery extends Query implements SelectQueryInterface { if (!$count->distinct) { // When not executing a distinct query, we can zero-out existing fields - // and expressions that are not used by a GROUP BY. Fields listed in + // and expressions that are not used by a GROUP BY. Fields listed in // the GROUP BY clause need to be present in the query. $fields =& $count->getFields(); foreach (array_keys($fields) as $field) { @@ -1487,7 +1487,7 @@ class SelectQuery extends Query implements SelectQueryInterface { // Don't use the AS keyword for table aliases, as some // databases don't support it (e.g., Oracle). - $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); + $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); if (!empty($table['condition'])) { $query .= ' ON ' . $table['condition']; @@ -1499,7 +1499,7 @@ class SelectQuery extends Query implements SelectQueryInterface { // The following line will not generate placeholders correctly if there // is a subquery. Fortunately, it is also called from getArguments() first // so it's not a problem in practice... unless you try to call __toString() - // before calling getArguments(). That is a problem that we will have to + // before calling getArguments(). That is a problem that we will have to // fix in Drupal 8, because it requires more refactoring than we are // able to do in Drupal 7. // @todo Move away from __toString() For SelectQuery compilation at least. diff --git a/includes/database/sqlite/database.inc b/includes/database/sqlite/database.inc index 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 9ee7889..21d0d95 100644 --- a/includes/entity.inc +++ b/includes/entity.inc @@ -840,7 +840,7 @@ class EntityFieldQuery { * Enable a pager for the query. * * @param $limit - * An integer specifying the number of elements per page. If passed a false + * An integer specifying the number of elements per page. If passed a false * value (FALSE, 0, NULL), the pager is disabled. * @param $element * An optional integer to distinguish between multiple pagers on one page. @@ -875,7 +875,7 @@ class EntityFieldQuery { */ public function tableSort(&$headers) { // If 'field' is not initialized, the header columns aren't clickable - foreach ($headers as $key =>$header) { + foreach ($headers as $key => $header) { if (is_array($header) && isset($header['specifier'])) { $headers[$key]['field'] = ''; } diff --git a/includes/errors.inc b/includes/errors.inc index 62d4201..b44f5c3 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -216,7 +216,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 8cbfa80..7cfcc28 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -485,7 +485,7 @@ function file_create_htaccess($directory, $private = TRUE) { else { $directory = rtrim($directory, '/\\'); } - $htaccess_path = $directory . '/.htaccess'; + $htaccess_path = $directory . '/.htaccess'; if (file_exists($htaccess_path)) { // Short circuit if the .htaccess file already exists. @@ -1670,7 +1670,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/filetransfer.inc b/includes/filetransfer/filetransfer.inc index 2083da9..b224d35 100644 --- a/includes/filetransfer/filetransfer.inc +++ b/includes/filetransfer/filetransfer.inc @@ -304,7 +304,7 @@ abstract class FileTransfer { $check = implode($parts, '/'); if ($this->isFile($check . '/' . basename(__FILE__))) { // Remove the trailing slash. - return substr($chroot,0,-1); + return substr($chroot, 0, -1); } $chroot .= array_shift($parts) . '/'; } diff --git a/includes/filetransfer/ftp.inc b/includes/filetransfer/ftp.inc index 838dc7c..cc05b5c 100644 --- a/includes/filetransfer/ftp.inc +++ b/includes/filetransfer/ftp.inc @@ -86,7 +86,7 @@ class FileTransferFTPExtension extends FileTransferFTP implements FileTransferCh if ($item == '.' || $item == '..') { continue; } - if (@ftp_chdir($this->connection, $item)){ + if (@ftp_chdir($this->connection, $item)) { ftp_cdup($this->connection); $this->removeDirectory(ftp_pwd($this->connection) . '/' . $item); } @@ -122,7 +122,7 @@ class FileTransferFTPExtension extends FileTransferFTP implements FileTransferCh function chmodJailed($path, $mode, $recursive) { if (!ftp_chmod($this->connection, $mode, $path)) { - throw new FileTransferException("Unable to set permissions on %file", NULL, array ('%file' => $path)); + throw new FileTransferException("Unable to set permissions on %file", NULL, array('%file' => $path)); } if ($this->isDirectory($path) && $recursive) { $filelist = @ftp_nlist($this->connection, $path); diff --git a/includes/filetransfer/ssh.inc b/includes/filetransfer/ssh.inc index 43ec324..fdd1d0a 100644 --- a/includes/filetransfer/ssh.inc +++ b/includes/filetransfer/ssh.inc @@ -62,7 +62,7 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface } /** - * WARNING: This is untested. It is not currently used, but should do the trick. + * WARNING: This is untested. It is not currently used, but should do the trick. */ public function isDirectory($path) { $directory = escapeshellarg($path); @@ -72,7 +72,8 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface return TRUE; } return FALSE; - } else { + } + else { throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path)); } } @@ -85,7 +86,8 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface return TRUE; } return FALSE; - } else { + } + else { throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path)); } } diff --git a/includes/form.inc b/includes/form.inc index 14cf618..1b96ffd 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -379,7 +379,7 @@ function form_state_defaults() { 'submitted' => FALSE, 'executed' => FALSE, 'programmed' => FALSE, - 'cache'=> FALSE, + 'cache' => FALSE, 'method' => 'post', 'groups' => array(), 'buttons' => array(), @@ -2403,7 +2403,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 @@ -2729,14 +2729,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'], diff --git a/includes/install.core.inc b/includes/install.core.inc index a74dfdf..56dae46 100644 --- a/includes/install.core.inc +++ b/includes/install.core.inc @@ -1106,7 +1106,7 @@ function install_select_profile_form($form, &$form_state, $profile_files) { ); } $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array( + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); @@ -1255,7 +1255,7 @@ function install_select_locale_form($form, &$form_state, $locales, $profilename) ); } $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array( + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); diff --git a/includes/install.inc b/includes/install.inc index 3634660..6f6cf5f 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -410,7 +410,7 @@ abstract class DatabaseTasks { $message = ''; foreach ($this->results as $result => $success) { if (!$success) { - $message .= '' . $result . '
'; + $message .= '' . $result . '
'; } } if (!empty($message)) { @@ -561,7 +561,7 @@ abstract class DatabaseTasks { // Verify the database port. if (!empty($database['port']) && !is_numeric($database['port'])) { - $errors[$database['driver'] . '][advanced_options][port'] = st('Database port must be a number.'); + $errors[$database['driver'] . '][advanced_options][port'] = st('Database port must be a number.'); } return $errors; @@ -1045,7 +1045,7 @@ function st($string, array $args = array(), array $options = array()) { // with its name ending in {$install_state['parameters']['locale']}.po // This might or might not be the entire filename. It is also possible // that multiple files end with the same extension, even if unlikely. - $po_files = file_scan_directory('./profiles/' . $install_state['parameters']['profile'] . '/translations', '/'. $install_state['parameters']['locale'] .'\.po$/', array('recurse' => FALSE)); + $po_files = file_scan_directory('./profiles/' . $install_state['parameters']['profile'] . '/translations', '/' . $install_state['parameters']['locale'] . '\.po$/', array('recurse' => FALSE)); if (count($po_files)) { require_once DRUPAL_ROOT . '/includes/locale.inc'; foreach ($po_files as $po_file) { diff --git a/includes/mail.inc b/includes/mail.inc index 46c7987..c695d30 100644 --- a/includes/mail.inc +++ b/includes/mail.inc @@ -55,7 +55,7 @@ define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || strpos($_SERVER['SERVER * $data['user'] = $params['account']; * $options['language'] = $message['language']; * user_mail_tokens($variables, $data, $options); - * switch($key) { + * switch ($key) { * case 'notice': * $langcode = $message['language']->language; * $message['subject'] = t('Notification from !site', $variables, array('langcode' => $langcode)); @@ -179,7 +179,7 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N * DefaultMailSystem implementation. * * The selection of a particular implementation is controlled via the variable - * 'mail_system', which is a keyed array. The default implementation + * 'mail_system', which is a keyed array. The default implementation * is the class whose name is the value of 'default-system' key. A more specific * match first to key and then to module will be used in preference to the * default. To specificy a different class for all mail sent by one module, set diff --git a/includes/menu.inc b/includes/menu.inc index 3a376f2..565aa6d 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -305,7 +305,7 @@ define('MENU_MAX_DEPTH', 9); function menu_get_ancestors($parts) { $number_parts = count($parts); $ancestors = array(); - $length = $number_parts - 1; + $length = $number_parts - 1; $end = (1 << $number_parts) - 1; $masks = variable_get('menu_masks', array()); // Only examine patterns that actually exist as router items (the masks). @@ -3408,7 +3408,7 @@ function _menu_router_build($callbacks) { $parts[$k] = '%'; } else { - $fit |= 1 << ($slashes - $k); + $fit |= 1 << ($slashes - $k); } } if ($fit) { diff --git a/includes/pager.inc b/includes/pager.inc index 146033f..1117a6f 100644 --- a/includes/pager.inc +++ b/includes/pager.inc @@ -9,7 +9,7 @@ /** * Query extender for pager queries. * - * This is the "default" pager mechanism. It creates a paged query with a fixed + * This is the "default" pager mechanism. It creates a paged query with a fixed * number of entries per page. */ class PagerDefault extends SelectQueryExtender { @@ -96,11 +96,11 @@ class PagerDefault extends SelectQueryExtender { /** * Specify the count query object to use for this pager. * - * You will rarely need to specify a count query directly. If not specified, + * You will rarely need to specify a count query directly. If not specified, * one is generated off of the pager query itself. * * @param SelectQueryInterface $query - * The count query object. It must return a single row with a single column, + * The count query object. It must return a single row with a single column, * which is the total number of records. */ public function setCountQuery(SelectQueryInterface $query) { @@ -131,7 +131,7 @@ class PagerDefault extends SelectQueryExtender { * The default if not specified is 10 items per page. * * @param $limit - * An integer specifying the number of elements per page. If passed a false + * An integer specifying the number of elements per page. If passed a false * value (FALSE, 0, NULL), the pager is disabled. */ public function limit($limit = 10) { @@ -143,8 +143,8 @@ class PagerDefault extends SelectQueryExtender { * Specify the element ID for this pager query. * * The element is used to differentiate different pager queries on the same - * page so that they may be operated independently. If you do not specify an - * element, every pager query on the page will get a unique element. If for + * page so that they may be operated independently. If you do not specify an + * element, every pager query on the page will get a unique element. If for * whatever reason you want to explicitly define an element for a given query, * you may do so here. * @@ -154,7 +154,7 @@ class PagerDefault extends SelectQueryExtender { * Note that no collision detection is done when setting an element ID * explicitly, so it is possible for two pagers to end up using the same ID * if both are set explicitly. - * + * * @param $element */ public function element($element) { diff --git a/includes/password.inc b/includes/password.inc index 13659f8..4004dcb 100644 --- a/includes/password.inc +++ b/includes/password.inc @@ -177,7 +177,7 @@ function _password_crypt($algo, $password, $setting) { } while (--$count); $len = strlen($hash); - $output = $setting . _password_base64_encode($hash, $len); + $output = $setting . _password_base64_encode($hash, $len); // _password_base64_encode() of a 16 byte MD5 will always be 22 characters. // _password_base64_encode() of a 64 byte sha512 will always be 86 characters. $expected = 12 + ceil((8 * $len) / 6); @@ -248,7 +248,7 @@ function user_check_password($password, $account) { case '$H$': // phpBB3 uses "$H$" for the same thing as "$P$". case '$P$': - // A phpass password generated using md5. This is an + // A phpass password generated using md5. This is an // imported password or from an earlier Drupal version. $hash = _password_crypt('md5', $password, $stored_hash); break; diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc index 3c88f3d..535e656 100644 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -591,7 +591,7 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface */ public function dirname($uri = NULL) { list($scheme, $target) = explode('://', $uri, 2); - $target = $this->getTarget($uri); + $target = $this->getTarget($uri); $dirname = dirname($target); if ($dirname == '.') { diff --git a/includes/update.inc b/includes/update.inc index f7a8fd6..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; @@ -636,7 +636,7 @@ function update_retrieve_dependencies() { $return = array(); // Get a list of installed modules, arranged so that we invoke their hooks in // the same order that module_invoke_all() does. - $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version != :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol(); + $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version <> :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol(); foreach ($modules as $module) { $function = $module . '_update_dependencies'; if (function_exists($function)) { diff --git a/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/ajax.js b/misc/ajax.js index 830c8aa..2af0a3b 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -202,16 +202,16 @@ Drupal.ajax = function (base, element, element_settings) { * will test to see if the key press is valid to trigger this event and * if it is, trigger it for us and prevent other keypresses from triggering. * In this case we're handling RETURN and SPACEBAR keypresses (event codes 13 - * and 32. RETURN is often used to submit a form when in a textfield, and - * SPACE is often used to activate an element without submitting. + * and 32. RETURN is often used to submit a form when in a textfield, and + * SPACE is often used to activate an element without submitting. */ Drupal.ajax.prototype.keypressResponse = function (element, event) { // Create a synonym for this to reduce code confusion. var ajax = this; // Detect enter key and space bar and allow the standard response for them, - // except for form elements of type 'text' and 'textarea', where the - // spacebar activation causes inappropriate activation if #ajax['keypress'] is + // except for form elements of type 'text' and 'textarea', where the + // spacebar activation causes inappropriate activation if #ajax['keypress'] is // TRUE. On a text-type widget a space should always be a space. if (event.which == 13 || (event.which == 32 && element.type != 'text' && element.type != 'textarea')) { $(ajax.element_settings.element).trigger(ajax.element_settings.event); diff --git a/misc/collapse.js b/misc/collapse.js index 1a98dc0..6189151 100644 --- a/misc/collapse.js +++ b/misc/collapse.js @@ -58,7 +58,7 @@ Drupal.behaviors.collapse = { $('fieldset.collapsible', context).once('collapse', function () { var $fieldset = $(this); // Expand fieldset if there are errors inside, or if it contains an - // element that is targeted by the uri fragment identifier. + // element that is targeted by the uri fragment identifier. var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : ''; if ($('.error' + anchor, $fieldset).length) { $fieldset.removeClass('collapsed'); diff --git a/misc/tabledrag.js b/misc/tabledrag.js index b566168..88e0be7 100644 --- a/misc/tabledrag.js +++ b/misc/tabledrag.js @@ -810,8 +810,8 @@ Drupal.tableDrag.prototype.copyDragClasses = function (sourceRow, targetRow, gro }; Drupal.tableDrag.prototype.checkScroll = function (cursorY) { - var de = document.documentElement; - var b = document.body; + var de = document.documentElement; + var b = document.body; var windowHeight = this.windowHeight = window.innerHeight || (de.clientHeight && de.clientWidth != 0 ? de.clientHeight : b.offsetHeight); var scrollY = this.scrollY = (document.all ? (!de.scrollTop ? b.scrollTop : de.scrollTop) : (window.pageYOffset ? window.pageYOffset : window.scrollY)); diff --git a/misc/ui/jquery.ui.button.css b/misc/ui/jquery.ui.button.css diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test index 1ab12dc..2158711 100644 --- a/modules/aggregator/aggregator.test +++ b/modules/aggregator/aggregator.test @@ -371,7 +371,7 @@ class UpdateFeedTestCase extends AggregatorTestCase { // Get new feed data array and modify newly created feed. $edit = $this->getFeedEditArray(); - $edit['refresh'] = 1800; // Change refresh value. + $edit['refresh'] = 1800; // Change refresh value. if (isset($feed->{$same_field})) { $edit[$same_field] = $feed->{$same_field}; } diff --git a/modules/block/block.api.php b/modules/block/block.api.php index d33f594..98a1ab4 100644 --- a/modules/block/block.api.php +++ b/modules/block/block.api.php @@ -226,7 +226,8 @@ function hook_block_view($delta = '') { '#theme' => 'node_recent_block', '#nodes' => $nodes, ); - } else { + } + else { $block['content'] = t('No content available.'); } } diff --git a/modules/block/block.test b/modules/block/block.test index 022bf38..6d4b156 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -420,7 +420,7 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase { } /** - * Check for the accessibility of the admin theme on the block admin page. + * Check for the accessibility of the admin theme on the block admin page. */ function testAdminTheme() { // Create administrative user. diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 731bd2f..5a41c58 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -23,7 +23,7 @@ function blog_node_info() { */ function blog_user_view($account) { if (user_access('create blog content', $account)) { - $account->content['summary']['blog'] = array( + $account->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), // l() escapes the attributes, so we should not escape !username here. diff --git a/modules/book/book.module b/modules/book/book.module index de9561f..e890dfa 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -1042,11 +1042,11 @@ function template_preprocess_book_navigation(&$variables) { * * This helper function recursively modifies the $toc array for each item in * $tree, ignoring items in the exclude array or at a depth greater than the - * limit. Truncates titles over thirty characters and appends an indentation + * limit. Truncates titles over thirty characters and appends an indentation * string incremented by depth. * * @param $tree - * The data structure of the book's menu tree. Includes hidden links. + * The data structure of the book's menu tree. Includes hidden links. * @param $indent * A string appended to each menu item title. Increments by '--' per depth * level. diff --git a/modules/color/color.module b/modules/color/color.module index 624575d..e32f335 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 .= '' . check_plain(var_export($original_element, TRUE)) . '' - . '
' . check_plain(var_export($element, TRUE)) . '' + $this->verbose('
' . check_plain(var_export($original_element, TRUE)) . '' + . '
' . check_plain(var_export($element, TRUE)) . '' . '
'.t('Cron takes care of running periodical tasks like checking for updates and indexing content for search.').'
', + '#markup' => '' . t('Cron takes care of running periodical tasks like checking for updates and indexing content for search.').'
', ); $form['run'] = array( '#type' => 'submit', @@ -1912,7 +1912,7 @@ function system_regional_settings() { '#default_value' => $configurable_timezones, ); - $form['timezone']['configurable_timezones_wrapper'] = array( + $form['timezone']['configurable_timezones_wrapper'] = array( '#type' => 'container', '#states' => array( // Hide the user configured timezone settings when users are forced to use @@ -2642,7 +2642,7 @@ function theme_system_themes_page($variables) { continue; } // Start new theme group. - $output .= '