From 948066265b8751b22e5014120ab74cf2c38eee70 Mon Sep 17 00:00:00 2001 From: David Rothstein <drothstein@gmail.com> Date: Tue, 6 Jun 2017 01:57:06 -0400 Subject: [PATCH] Issue #2851725 by Jigar.addweb, tameeshb: Fix typos in various code comments in the includes directory --- includes/database/pgsql/database.inc | 12 ++++++------ includes/database/pgsql/install.inc | 2 +- includes/database/pgsql/select.inc | 4 ++-- includes/database/query.inc | 2 +- includes/database/schema.inc | 2 +- includes/database/sqlite/schema.inc | 2 +- includes/errors.inc | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/includes/database/pgsql/database.inc b/includes/database/pgsql/database.inc index 41579659bfe2..fb3d0ab5130c 100644 --- a/includes/database/pgsql/database.inc +++ b/includes/database/pgsql/database.inc @@ -11,7 +11,7 @@ */ /** - * The name by which to obtain a lock for retrive the next insert id. + * The name by which to obtain a lock for retrieving the next insert id. */ define('POSTGRESQL_NEXTID_LOCK', 1000); @@ -55,7 +55,7 @@ public function __construct(array $connection_options = array()) { $connection_options['pdo'] += array( // Prepared statements are most effective for performance when queries // are recycled (used several times). However, if they are not re-used, - // prepared statements become ineffecient. Since most of Drupal's + // prepared statements become inefficient. Since most of Drupal's // prepared queries are not re-used, it should be faster to emulate // the preparation than to actually ready statements for re-use. If in // doubt, reset to FALSE and measure performance. @@ -175,14 +175,14 @@ public function mapConditionOperator($operator) { } /** - * Retrive a the next id in a sequence. + * Retrieve the next id in a sequence. * * PostgreSQL has built in sequences. We'll use these instead of inserting * and updating a sequences table. */ public function nextId($existing = 0) { - // Retrive the name of the sequence. This information cannot be cached + // Retrieve the name of the sequence. This information cannot be cached // because the prefix may change, for example, like it does in simpletests. $sequence_name = $this->makeSequenceName('sequences', 'value'); @@ -194,7 +194,7 @@ public function nextId($existing = 0) { } // PostgreSQL advisory locks are simply locks to be used by an - // application such as Drupal. This will prevent other Drupal proccesses + // application such as Drupal. This will prevent other Drupal processes // from altering the sequence while we are. $this->query("SELECT pg_advisory_lock(" . POSTGRESQL_NEXTID_LOCK . ")"); @@ -209,7 +209,7 @@ public function nextId($existing = 0) { // Reset the sequence to a higher value than the existing id. $this->query("ALTER SEQUENCE " . $sequence_name . " RESTART WITH " . ($existing + 1)); - // Retrive the next id. We know this will be as high as we want it. + // Retrieve the next id. We know this will be as high as we want it. $id = $this->query("SELECT nextval('" . $sequence_name . "')")->fetchField(); $this->query("SELECT pg_advisory_unlock(" . POSTGRESQL_NEXTID_LOCK . ")"); diff --git a/includes/database/pgsql/install.inc b/includes/database/pgsql/install.inc index c77f4ea78ce5..122031ee5dec 100644 --- a/includes/database/pgsql/install.inc +++ b/includes/database/pgsql/install.inc @@ -165,7 +165,7 @@ function initializeDatabase() { LANGUAGE \'sql\'' ); - // Using || to concatenate in Drupal is not recommeneded because there are + // Using || to concatenate in Drupal is not recommended because there are // database drivers for Drupal that do not support the syntax, however // they do support CONCAT(item1, item2) which we can replicate in // PostgreSQL. PostgreSQL requires the function to be defined for each diff --git a/includes/database/pgsql/select.inc b/includes/database/pgsql/select.inc index f6a83db7f45d..5b8736d6805e 100644 --- a/includes/database/pgsql/select.inc +++ b/includes/database/pgsql/select.inc @@ -80,7 +80,7 @@ public function orderBy($field, $direction = 'ASC') { } // If a table loads all fields, it can not be added again. It would - // result in an ambigious alias error because that field would be loaded + // result in an ambiguous alias error because that field would be loaded // twice: Once through table_alias.* and once directly. If the field // actually belongs to a different table, it must be added manually. foreach ($this->tables as $table) { @@ -90,7 +90,7 @@ public function orderBy($field, $direction = 'ASC') { } // If $field contains an characters which are not allowed in a field name - // it is considered an expression, these can't be handeld automatically + // it is considered an expression, these can't be handled automatically // either. if ($this->connection->escapeField($field) != $field) { return $return; diff --git a/includes/database/query.inc b/includes/database/query.inc index c9c5a8328a49..7ebe5eb4b625 100644 --- a/includes/database/query.inc +++ b/includes/database/query.inc @@ -1242,7 +1242,7 @@ public function __toString() { * MergeQuery::updateFields() and MergeQuery::insertFields() needs to be called * instead. MergeQuery::fields() can also be called which calls both of these * methods as the common case is to use the same column-value pairs for both - * INSERT and UPDATE. However, this is not mandatory. Another convinient + * INSERT and UPDATE. However, this is not mandatory. Another convenient * wrapper is MergeQuery::key() which adds the same column-value pairs to the * condition and the INSERT query part. * diff --git a/includes/database/schema.inc b/includes/database/schema.inc index 8461350730ff..31862db39400 100644 --- a/includes/database/schema.inc +++ b/includes/database/schema.inc @@ -294,7 +294,7 @@ function prefixNonTable($table) { protected function buildTableNameCondition($table_name, $operator = '=', $add_prefix = TRUE) { $info = $this->connection->getConnectionOptions(); - // Retrive the table name and schema + // Retrieve the table name and schema $table_info = $this->getPrefixInfo($table_name, $add_prefix); $condition = new DatabaseCondition('AND'); diff --git a/includes/database/sqlite/schema.inc b/includes/database/sqlite/schema.inc index df19d2fa54c5..281d8fc6bf22 100644 --- a/includes/database/sqlite/schema.inc +++ b/includes/database/sqlite/schema.inc @@ -244,7 +244,7 @@ public function renameTable($table, $new_name) { // database. So the syntax '...RENAME TO database.table' would fail. // So we must determine the full table name here rather than surrounding // the table with curly braces incase the db_prefix contains a reference - // to a database outside of our existsing database. + // to a database outside of our existing database. $info = $this->getPrefixInfo($new_name); $this->connection->query('ALTER TABLE {' . $table . '} RENAME TO ' . $info['table']); diff --git a/includes/errors.inc b/includes/errors.inc index 7393148e9be1..3548d1fd827b 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -66,7 +66,7 @@ function _drupal_error_handler_real($error_level, $message, $filename, $line, $c _drupal_log_error(array( '%type' => isset($types[$error_level]) ? $severity_msg : 'Unknown error', // The standard PHP error handler considers that the error messages - // are HTML. We mimick this behavior here. + // are HTML. We mimic this behavior here. '!message' => filter_xss_admin($message), '%function' => $caller['function'], '%file' => $caller['file'], @@ -114,7 +114,7 @@ function _drupal_decode_exception($exception) { return array( '%type' => get_class($exception), // The standard PHP exception handler considers that the exception message - // is plain-text. We mimick this behavior here. + // is plain-text. We mimic this behavior here. '!message' => check_plain($message), '%function' => $caller['function'], '%file' => $caller['file'], @@ -233,7 +233,7 @@ function _drupal_log_error($error, $fatal = FALSE) { } else { // Display the message if the current error reporting level allows this type - // of message to be displayed, and unconditionnaly in update.php. + // of message to be displayed, and unconditionally in update.php. if (error_displayable($error)) { $class = 'error'; -- GitLab