Commit af3f94b3 authored by Dries's avatar Dries

- Patch #693614 by asimmonds: fixed PHPDoc spelling typos.

parent 4f6cf1d1
......@@ -473,7 +473,7 @@ function ajax_process_form($element, &$form_state) {
* defined in misc/ajax.js.
*
* @param $text
* The message string to dipslay to the user.
* The message string to display to the user.
*
* @return
* An array suitable for use with the ajax_render() function.
......@@ -831,7 +831,7 @@ function ajax_command_data($selector, $name, $value) {
* Creates a Drupal AJAX 'restripe' command.
*
* The 'restripe' command instructs the client to restripe a table. This is
* usually used after a table has been modifed by a replace or append command.
* usually used after a table has been modified by a replace or append command.
*
* This command is implemented by Drupal.ajax.prototype.commands.restripe()
* defined in misc/ajax.js.
......
......@@ -12,7 +12,7 @@
interface ArchiverInterface {
/**
* Contructor for a new archiver instance.
* Constructor for a new archiver instance.
*
* @param $file_path
* The full system path of the archive to manipulate. Only local files
......@@ -61,7 +61,7 @@ public function extract($path, Array $files = array());
*
* @return
* An array of file names relative to the root of the archive, or
* an iteratable object that resolves to such a list.
* an iterable object that resolves to such a list.
*/
public function listContents();
}
......
......@@ -59,7 +59,7 @@ function authorize_filetransfer_form($form_state) {
* Here we create two submit buttons. For a JS enabled client, they will
* only ever see submit_process. However, if a client doesn't have JS
* enabled, they will see submit_connection on the first form (when picking
* what filetranfer type to use, and submit_process on the second one (which
* what filetransfer type to use, and submit_process on the second one (which
* leads to the actual operation).
*/
$form['submit_connection'] = array(
......
......@@ -1654,7 +1654,7 @@ function _drupal_bootstrap_variables() {
}
/**
* Bootstrap page header: Invoke hook_boot(), intialize locking system, and send default HTTP headers.
* Bootstrap page header: Invoke hook_boot(), initialize locking system, and send default HTTP headers.
*/
function _drupal_bootstrap_page_header() {
bootstrap_invoke_all('boot');
......
......@@ -634,7 +634,7 @@ function drupal_parse_url($url) {
* Otherwise, unwanted double encoding will occur.
*
* Notes:
* - For esthetic reasons, we do not escape slashes. This also avoids a 'feature'
* - For aesthetic reasons, we do not escape slashes. This also avoids a 'feature'
* in Apache where it 404s on any path containing '%2F'.
* - mod_rewrite unescapes %-encoded ampersands, hashes, and slashes when clean
* URLs are used, which are interpreted as delimiters by PHP. These
......@@ -1112,7 +1112,7 @@ function _drupal_exception_handler($exception) {
}
/**
* Decode an exception, especially to retrive the correct caller.
* Decode an exception, especially to retrieve the correct caller.
*
* @param $exception
* The exception object that was thrown.
......@@ -1163,7 +1163,7 @@ function _drupal_decode_exception($exception) {
* TRUE if the error is fatal.
*/
function _drupal_log_error($error, $fatal = FALSE) {
// Initialize a maintenance theme if the boostrap was not complete.
// Initialize a maintenance theme if the bootstrap was not complete.
// Do it early because drupal_set_message() triggers a drupal_theme_initialize().
if ($fatal && (drupal_get_bootstrap_phase() != DRUPAL_BOOTSTRAP_FULL)) {
unset($GLOBALS['theme']);
......@@ -1213,7 +1213,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.
$error_level = variable_get('error_level', ERROR_REPORTING_DISPLAY_ALL);
$display_error = $error_level == ERROR_REPORTING_DISPLAY_ALL || ($error_level == ERROR_REPORTING_DISPLAY_SOME && $error['%type'] != 'Notice');
if ($display_error || (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update')) {
......@@ -2306,7 +2306,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
}
}
// Store DateTimeZone objects in an array rather than repeatedly
// contructing identical objects over the life of a request.
// constructing identical objects over the life of a request.
if (!isset($timezones[$timezone])) {
$timezones[$timezone] = timezone_open($timezone);
}
......@@ -2484,7 +2484,7 @@ function url($path = NULL, array $options = array()) {
// Only call the slow filter_xss_bad_protocol if $path contains a ':'
// before any / ? or #.
// Note: we could use url_is_external($path) here, but that would
// requre another function call, and performance inside url() is critical.
// require another function call, and performance inside url() is critical.
$colonpos = strpos($path, ':');
$options['external'] = ($colonpos !== FALSE && !preg_match('![/?#]!', substr($path, 0, $colonpos)) && filter_xss_bad_protocol($path, FALSE) == check_plain($path));
}
......@@ -3272,7 +3272,7 @@ function drupal_get_css($css = NULL) {
// Sort css items according to their weights.
uasort($css, 'drupal_sort_weight');
// Remove the overriden CSS files. Later CSS files override former ones.
// Remove the overridden CSS files. Later CSS files override former ones.
$previous_item = array();
foreach ($css as $key => $item) {
if ($item['type'] == 'file') {
......@@ -3485,7 +3485,7 @@ function drupal_load_stylesheet_content($contents, $optimize = FALSE) {
// Perform some safe CSS optimizations.
$contents = preg_replace('{
(?<=\\\\\*/)([^/\*]+/\*)([^\*/]+\*/) # Add a backslash also at the end ie-mac hack comment, so the next pass will not touch it.
# The added backshlash does not affect the effectiveness of the hack.
# The added backslash does not affect the effectiveness of the hack.
}x', '\1\\\\\2', $contents);
$contents = preg_replace('<
\s*([@{}:;,]|\)\s|\s\()\s* | # Remove whitespace around separators, but keep space around parentheses.
......@@ -3729,7 +3729,7 @@ function drupal_region_class($region) {
* been toggled in admin/config/development/performance. Note that
* JavaScript of type 'external' is not aggregated. Defaults to TRUE.
* @return
* The contructed array of JavaScript files.
* The constructed array of JavaScript files.
* @see drupal_get_js()
*/
function drupal_add_js($data = NULL, $options = NULL) {
......@@ -4073,7 +4073,7 @@ function drupal_process_attached($elements, $weight = JS_DEFAULT, $dependency_ch
* @param $elements
* The structured array that may contain an array item named states. This
* array describes the different JavaScript states that can be applied to the
* element when certain contitions are met. The #states array is first keyed
* element when certain conditions are met. The #states array is first keyed
* by one of the following states:
* - enabled
* - invisible
......@@ -4995,8 +4995,8 @@ function drupal_render_page($page) {
* @see drupal_render_cid_create()
* - 'granularity' (optional): Define the cache granularity using binary
* combinations of the cache granularity constants, e.g. DRUPAL_CACHE_PER_USER
* to cache for each user seperately or
* DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to cache seperately for each
* to cache for each user separately or
* DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to cache separately for each
* page and role. If not specified the element is cached globally for each
* theme and language.
* - 'cid': Specify the cache ID directly. Either 'keys' or 'cid' is required.
......@@ -5313,8 +5313,8 @@ function drupal_render_cache_by_query($query, $function, $expire = CACHE_TEMPORA
*
* @param $granularity
* One or more cache granularity constants, e.g. DRUPAL_CACHE_PER_USER to cache
* for each user seperately or DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to
* cache seperately for each page and role.
* for each user separately or DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to
* cache separately for each page and role.
*
* @return
* An array of cache ID parts, always containing the active theme. If the
......@@ -6356,7 +6356,7 @@ function drupal_parse_dependency($dependency) {
* The version to check against (like 4.2).
* @return
* NULL if compatible, otherwise the original dependency version string that
* caused the incompatiblity.
* caused the incompatibility.
*
* @see drupal_parse_dependency()
*/
......
......@@ -836,7 +836,7 @@ public function escapeTable($table) {
* Escape characters that work as wildcard characters in a LIKE pattern.
*
* The wildcard characters "%" and "_" as well as backslash are prefixed with
* a backslash. Use this to do a seach for a verbatim string without any
* a backslash. Use this to do a search for a verbatim string without any
* wildcard behavior.
*
* For example, the following does a case-insensitive query for all rows whose
......@@ -1259,7 +1259,7 @@ abstract class Database {
* A logging function callback array.
*
* The function must accept the same function signature as Drupal's
* watchdog(). The array containst key/value pairs for callback (string),
* watchdog(). The array contains key/value pairs for callback (string),
* default_severity (int), and error_severity (int).
*
* @var string
......@@ -1561,7 +1561,7 @@ public static function addConnectionInfo($key, $target, $info) {
* The database connection key. Defaults to NULL which means the active key.
*/
public static function closeConnection($target = NULL, $key = NULL) {
// Gets the active conection by default.
// Gets the active connection by default.
if (!isset($key)) {
$key = self::$activeKey;
}
......@@ -2338,7 +2338,7 @@ function db_escape_table($table) {
* Escape characters that work as wildcard characters in a LIKE pattern.
*
* The wildcard characters "%" and "_" as well as backslash are prefixed with
* a backslash. Use this to do a seach for a verbatim string without any
* a backslash. Use this to do a search for a verbatim string without any
* wildcard behavior.
*
* For example, the following does a case-insensitive query for all rows whose
......
......@@ -42,7 +42,7 @@ public function __construct(array $connection_options = array()) {
// This allows Drupal to run almost seamlessly on many different
// kinds of database systems. These settings force MySQL to behave
// the same as postgresql, or sqlite in regards to syntax interpretation
// and invalid data handling. See http://drupal.org/node/344575 for further disscussion.
// and invalid data handling. See http://drupal.org/node/344575 for further discussion.
$this->exec("SET sql_mode='ANSI,TRADITIONAL'");
}
......
......@@ -528,7 +528,7 @@ public function preExecute() {
// We have to assume that the used aliases match the insert fields.
// Regular fields are added to the query before expressions, maintain the
// same order for the insert fields.
// This behavior can be overriden by calling fields() manually as only the
// This behavior can be overridden by calling fields() manually as only the
// first call to fields() does have an effect.
$this->fields(array_merge(array_keys($this->fromQuery->getFields()), array_keys($this->fromQuery->getExpressions())));
}
......
......@@ -84,7 +84,7 @@
* of the local table, each value is an array with a single key pair as
* 'tablename' => 'column' where 'column' is the foreign column to
* reference.
* - 'indexes': An associative array of indexes ('indexame' =>
* - 'indexes': An associative array of indexes ('indexname' =>
* specification). Each specification is an array of one or more
* key column specifiers (see below) that form an index on the
* table.
......@@ -216,7 +216,7 @@ public function tableExists($table) {
$condition = $this->buildTableNameCondition($this->connection->prefixTables('{' . $table . '}'));
$condition->compile($this->connection, $this);
// Normally, we would heartily discourage the use of string
// concatination for conditionals like this however, we
// concatenation for conditionals like this however, we
// couldn't use db_select() here because it would prefix
// information_schema.tables and the query would fail.
// Don't use {} around information_schema.tables table.
......@@ -236,7 +236,7 @@ public function findTables($table_expression) {
$condition = $this->buildTableNameCondition($table_expression, 'LIKE');
$condition->compile($this->connection, $this);
// Normally, we would heartily discourage the use of string
// concatination for conditionals like this however, we
// concatenation for conditionals like this however, we
// couldn't use db_select() here because it would prefix
// information_schema.tables and the query would fail.
// Don't use {} around information_schema.tables table.
......@@ -251,7 +251,7 @@ public function columnExists($table, $column) {
$condition->condition('column_name', $column);
$condition->compile($this->connection, $this);
// Normally, we would heartily discourage the use of string
// concatination for conditionals like this however, we
// concatenation for conditionals like this however, we
// couldn't use db_select() here because it would prefix
// information_schema.tables and the query would fail.
// Don't use {} around information_schema.columns table.
......
......@@ -541,7 +541,7 @@ public function compile(DatabaseConnection $connection, QueryPlaceholderInterfac
return $this->condition->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
}
/* Implmeentations of QueryConditionInterface for the HAVING clause. */
/* Implementations of QueryConditionInterface for the HAVING clause. */
public function havingCondition($field, $value = NULL, $operator = '=') {
$this->query->condition($field, $value, $operator, $num_args);
......@@ -940,7 +940,7 @@ public function compile(DatabaseConnection $connection, QueryPlaceholderInterfac
return $this->where->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
}
/* Implmeentations of QueryConditionInterface for the HAVING clause. */
/* Implementations of QueryConditionInterface for the HAVING clause. */
public function havingCondition($field, $value = NULL, $operator = '=') {
if (!isset($num_args)) {
......
......@@ -30,7 +30,7 @@
* - filemime: The file's MIME type.
* - filesize: The size of the file in bytes.
* - status: A bitmapped field indicating the status of the file. The first 8
* bits are reserved for Drupal core. The least sigifigant bit indicates
* bits are reserved for Drupal core. The least significant bit indicates
* temporary (0) or permanent (1). Temporary files older than
* DRUPAL_MAXIMUM_TEMP_FILE_AGE will be removed during cron runs.
* - timestamp: UNIX timestamp for the date the file was added to the database.
......@@ -976,7 +976,7 @@ function file_unmanaged_delete($path) {
return unlink($path);
}
// Return TRUE for non-existent file, but log that nothing was actually
// deleted, as the current state is the indended result.
// deleted, as the current state is the intended result.
if (!file_exists($path)) {
watchdog('file', 'The file %path was not deleted, because it does not exist.', array('%path' => $path), WATCHDOG_NOTICE);
return TRUE;
......@@ -1000,7 +1000,7 @@ function file_unmanaged_delete($path) {
* Note that this only deletes visible files with write permission.
*
* @param $path
* A string containing eiher an URI or a file or directory path.
* A string containing either an URI or a file or directory path.
* @return
* TRUE for success or if path does not exist, FALSE in the event of an
* error.
......@@ -1238,7 +1238,7 @@ function file_save_upload($source, $validators = array(), $destination = FALSE,
* indicates that the file passed validation. The functions will be called in
* the order specified.
* @return
* An array contaning validation error messages.
* An array containing validation error messages.
*
* @see hook_file_validate()
*/
......@@ -1362,7 +1362,7 @@ function file_validate_is_image(stdClass $file) {
* Verify that image dimensions are within the specified maximum and minimum.
*
* Non-image files will be ignored. If a image toolkit is available the image
* will be scalled to fit within the desired maximum dimensions.
* will be scaled to fit within the desired maximum dimensions.
*
* @param $file
* A Drupal file object. This function may resize the file affecting its
......@@ -1731,7 +1731,7 @@ function file_get_mimetype($uri, $mapping = NULL) {
*
* PHP's chmod does not support stream wrappers so we use our wrapper
* implementation which interfaces with chmod() by default. Contrib wrappers
* may override this bahavior in their implementations as needed.
* may override this behavior in their implementations as needed.
*
* @param $uri
* A string containing a URI file, or directory path.
......@@ -1895,7 +1895,7 @@ function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) {
* The prefix of the generated temporary filename.
* Note: Windows uses only the first three characters of prefix.
* @return
* The new temporary fillename, or FALSE on failure.
* The new temporary filename, or FALSE on failure.
*
* @see tempnam()
* @ingroup php_wrappers
......
......@@ -5,7 +5,7 @@
* Base FileTransfer class.
*
* Classes extending this class perform file operations on directories not
* writeable by the webserver. To achieve this, the class should connect back
* writable by the webserver. To achieve this, the class should connect back
* to the server using some backend (for example FTP or SSH). To keep security,
* the password should always be asked from the user and never stored. For
* safety, all methods operate only inside a "jail", by default the Drupal root.
......@@ -17,7 +17,7 @@ abstract class FileTransfer {
protected $port;
/**
* The constructer for the UpdateConnection class. This method is also called
* The constructor for the UpdateConnection class. This method is also called
* from the classes that extend this class and override this method.
*/
function __construct($jail) {
......@@ -150,7 +150,7 @@ function __get($name) {
/**
* Returns a modified path suitable for passing to the server.
* If a path is a windows path, makes it posix compliant by removing the drive letter.
* If a path is a windows path, makes it POSIX compliant by removing the drive letter.
* If $this->chroot has a value, it is stripped from the path to allow for
* chroot'd filetransfer systems.
*
......@@ -171,13 +171,13 @@ function __get($name) {
}
/**
* Changes backslahes to slashes, also removes a trailing slash.
* Changes backslashes to slashes, also removes a trailing slash.
*
* @param string $path
* @return string
*/
function sanitizePath($path) {
$path = str_replace('\\', '/', $path); // Windows path sanitiation.
$path = str_replace('\\', '/', $path); // Windows path sanitization.
if (substr($path, -1) == '/') {
$path = substr($path, 0, -1);
}
......
......@@ -776,7 +776,7 @@ function drupal_prepare_form($form_id, &$form, &$form_state) {
* form validation functions are passed an explicit copy of the
* values for the sake of simplicity. Validation handlers can also
* $form_state to pass information on to submit handlers. For example:
* $form_state['data_for_submision'] = $data;
* $form_state['data_for_submission'] = $data;
* This technique is useful when validation requires file parsing,
* web service requests, or other expensive requests that should
* not be repeated in the submission step.
......@@ -881,7 +881,7 @@ function drupal_redirect_form($form_state) {
* form validation functions are passed an explicit copy of the
* values for the sake of simplicity. Validation handlers can also
* $form_state to pass information on to submit handlers. For example:
* $form_state['data_for_submision'] = $data;
* $form_state['data_for_submission'] = $data;
* This technique is useful when validation requires file parsing,
* web service requests, or other expensive requests that should
* not be repeated in the submission step.
......@@ -3413,7 +3413,7 @@ function batch_process($redirect = NULL, $url = 'batch', $redirect_callback = 'd
// The batch is now completely built. Allow other modules to make changes
// to the batch so that it is easier to reuse batch processes in other
// enviroments.
// environments.
drupal_alter('batch', $batch);
// Assign an arbitrary id: don't rely on a serial column in the 'batch'
......
......@@ -15,7 +15,7 @@
* allows site administrators to choose the library that's best for them.
*
* PHP includes the GD library by default so a GD toolkit is installed with
* Drupal. Other toolkits like ImageMagic are available from contrib modules.
* Drupal. Other toolkits like ImageMagick are available from contrib modules.
* GD works well for small images, but using it with larger files may cause PHP
* to run out of memory. In contrast the ImageMagick library does not suffer
* from this problem, but it requires the ISP to have installed additional
......@@ -187,7 +187,7 @@ function image_scale_and_crop(stdClass $image, $width, $height) {
* The target height, in pixels. This value is omitted then the scaling will
* based only on the width value.
* @param $upscale
* Boolean indicating that files smaller than the dimensions will be scalled
* Boolean indicating that files smaller than the dimensions will be scaled
* up. This generally results in a low quality image.
* @return
* TRUE or FALSE, based on success.
......@@ -332,7 +332,7 @@ function image_desaturate(stdClass $image) {
* - 'info' - The array of information returned by image_get_info()
* - 'toolkit' - The name of the image toolkit requested when the image was
* loaded.
* Image tookits may add additional properties. The caller is advised not to
* Image toolkits may add additional properties. The caller is advised not to
* monkey about with them.
*
* @see image_save()
......
......@@ -1073,7 +1073,7 @@ function install_profile_info($profile, $locale = 'en') {
*
* This will run tasks that check that Drupal can perform all of the functions
* on a database, that Drupal needs. Tasks include simple checks like CREATE
* TABLE to database specfic functions like stored procedures and client
* TABLE to database specific functions like stored procedures and client
* encoding.
*/
function db_run_tasks($driver) {
......
......@@ -9,7 +9,7 @@
/**
* Get an array of all country code => country name pairs.
*
* Get an array of all country code => country name pairs as layed out
* Get an array of all country code => country name pairs as laid out
* in ISO 3166-1 alpha-2.
* Grabbed from location project (http://drupal.org/project/location).
* @return
......
......@@ -34,7 +34,7 @@ function language_types_info() {
* Return only the configurable language types.
*
* A language type maybe configurable or fixed. A fixed language type is a type
* whose negotiation values are unchangable and defined while defining the
* whose negotiation values are unchangeable and defined while defining the
* language type itself.
*
* @return
......@@ -264,7 +264,7 @@ function language_provider_invoke($provider_id, $provider = NULL) {
require_once DRUPAL_ROOT . '/' . $provider['file'];
}
// If the language provider has no cache preference or this is satisified
// If the language provider has no cache preference or this is satisfied
// we can execute the callback.
$cache = !isset($provider['cache']) || $user->uid || $provider['cache'] == variable_get('cache', CACHE_DISABLED);
$callback = isset($provider['callbacks']['language']) ? $provider['callbacks']['language'] : FALSE;
......
......@@ -100,7 +100,7 @@ function locale_language_from_browser($languages) {
* An array of valid language objects.
*
* @return
* A valid language code on succes, FALSE otherwise.
* A valid language code on success, FALSE otherwise.
*/
function locale_language_from_user($languages) {
// User preference (only for logged users).
......@@ -121,7 +121,7 @@ function locale_language_from_user($languages) {
* An array of valid language objects.
*
* @return
* A valid language code on succes, FALSE otherwise.
* A valid language code on success, FALSE otherwise.
*/
function locale_language_from_session($languages) {
$param = variable_get('locale_language_negotiation_session_param', 'language');
......@@ -146,7 +146,7 @@ function locale_language_from_session($languages) {
* An array of valid language objects.
*
* @return
* A valid language code on succes, FALSE otherwise.
* A valid language code on success, FALSE otherwise.
*/
function locale_language_from_url($languages) {
$language_url = FALSE;
......@@ -303,7 +303,7 @@ function locale_language_url_rewrite_session(&$path, &$options) {
* This test can be used to detect possibly bad translation strings. It should
* not have any false positives. But it is only a test, not a transformation,
* as it destroys valid HTML. We cannot reliably filter translation strings
* on inport becuase some strings are irreversibly corrupted. For example,
* on import because some strings are irreversibly corrupted. For example,
* a &amp; in the translation would get encoded to &amp;amp; by filter_xss()
* before being put in the database, and thus would be displayed incorrectly.
*
......@@ -1370,7 +1370,7 @@ function _locale_export_po($language = NULL, $output = NULL) {
$filename = 'drupal.pot';
watchdog('locale', 'Exported translation file: %filename.', array('%filename' => $filename));
}
// Download the file fo the client.
// Download the file for the client.
header("Content-Disposition: attachment; filename=$filename");
header("Content-Type: text/plain; charset=utf-8");
print $output;
......
......@@ -93,7 +93,7 @@
define('MENU_VISIBLE_IN_BREADCRUMB', 0x0004);
/**
* Internal menu flag -- menu item links back to its parnet.
* Internal menu flag -- menu item links back to its parent.
*/
define('MENU_LINKS_TO_PARENT', 0x0008);
......
......@@ -155,7 +155,7 @@ function drupal_lookup_path($action, $path = '', $path_language = NULL) {
* Cache system paths for a page.
*
* Cache an array of the system paths available on each page. We assume
* that aiases will be needed for the majority of these paths during
* that aliases will be needed for the majority of these paths during
* subsequent requests, and load them in a single query during
* drupal_lookup_path().
*/
......
......@@ -85,7 +85,7 @@ function _drupal_session_read($sid) {
// Otherwise, if the session is still active, we have a record of the
// client's session in the database. If it's HTTPS then we are either have
// a HTTPS session or we are about to log in so we check the sessions table
// for an anonymous session wth the non-HTTPS-only cookie.
// for an anonymous session with the non-HTTPS-only cookie.
if ($is_https) {
$user = db_query("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.ssid = :ssid", array(':ssid' => $sid))->fetchObject();
if (!$user) {
......@@ -201,7 +201,7 @@ function drupal_session_initialize() {
}
else {
// Set a session identifier for this request. This is necessary because
// we lazyly start sessions at the end of this request, and some
// we lazily start sessions at the end of this request, and some
// processes (like drupal_get_token()) needs to know the future
// session ID in advance.
$user = drupal_anonymous_user();
......@@ -344,7 +344,7 @@ function _drupal_session_destroy($sid) {
* @param $name
* Name of session cookie to delete.
* @param $force_insecure
* Fornce cookie to be insecure.
* Force cookie to be insecure.
*/
function _drupal_session_delete_cookie($name, $force_insecure = FALSE) {
if (isset($_COOKIE[$name])) {
......
......@@ -13,7 +13,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 "://". Becuase 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".
*
* @link http://www.faqs.org/rfcs/rfc3986.html
......
......@@ -1982,7 +1982,7 @@ function theme_more_link($variables) {
* Preprocess variables for theme_username().
*
* Modules that make any changes to variables like 'name' or 'extra' must insure
* that the final string is safe to include directly in the ouput by using
* that the final string is safe to include directly in the output by using
* check_plain() or filter_xss().
*
* @see theme_username().
......@@ -2003,7 +2003,7 @@ function template_preprocess_username(&$variables) {
// Set the name to a formatted name that is safe for printing and
// that won't break tables by being too long. Keep an unshortened,
// unsanitized version, in case other preproces functions want to implement
// unsanitized version, in case other preprocess functions want to implement
// their own shortening logic or add markup. If they do so, they must ensure
// that $variables['name'] is safe for printing.
$name = $variables['name_raw'] = format_username($account);
......@@ -2167,7 +2167,7 @@ function _theme_table_cell($cell, $header = FALSE) {
/**
* Adds a default set of helper variables for variable processors and templates.
* This comes in before any other preprocess function which makes it possible to
* be used in default theme implementations (non-overriden theme functions).
* be used in default theme implementations (non-overridden theme functions).
*/
function template_preprocess(&$variables, $hook) {
global $user;
......
......@@ -50,7 +50,7 @@
* Replace all tokens in a given string with appropriate values.
*
* @param $text
* A string potentially containing replacable tokens.
* A string potentially containing replaceable tokens.
* @param $data
* (optional) An array of keyed objects. For simple replacement scenarios
* 'node', 'user', and others are common keys, with an accompanying node or
......
......@@ -544,7 +544,7 @@ function drupal_substr($text, $start, $length = NULL) {
$chars++;
}
}
// Backtrace one byte if we are not at the begining of the string.
// Backtrace one byte if we are not at the beginning of the string.
if ($iend > 0) {
$iend--;
}
......
......@@ -10,7 +10,7 @@
*/
/**
* Disable any items in the {system} table that are not core capatible.
* Disable any items in the {system} table that are not core compatible.
*/
function update_fix_compatibility() {
$incompatible = array();
......@@ -289,7 +289,7 @@ function update_fix_d7_requirements() {
db_add_field('menu_router', 'theme_callback', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
db_add_field('menu_router', 'theme_arguments', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
// Add the role_permisson table.
// Add the role_permission table.
$schema['role_permission'] = array(
'fields' => array(
'rid' => array(
......@@ -607,7 +607,7 @@ function update_fix_d7_install_profile() {
}
/**
* Parase pre-Drupal 7 database connection URLs and return D7 compatible array.
* Parse pre-Drupal 7 database connection URLs and return D7 compatible array.
*
* @return
* Drupal 7 DBTNG compatible array of database connection information.
......
......@@ -14,7 +14,7 @@
*
* An Updater currently serves the following purposes:
* - It can take a given directory, and determine if it can operate on it.
* - It can move the contents of that directoy into the appropriate place
* - It can move the contents of that directory into the appropriate place
* on the system using FileTransfer classes.
* - It can return a list of "next steps" after an update or install.
* - In the future, it will most likely perform some of those steps as well.
......
......@@ -1474,12 +1474,12 @@ function hook_field_create_instance($instance) {
* @param $has_data
* Whether any data already exists for this field.
* @return
* Throws a FieldUpdateForbiddenException to prevent the update from occuring.
* Throws a FieldUpdateForbiddenException to prevent the update from occurring.
*/
function hook_field_update_field_forbid($field, $prior_field, $has_data) {
// A 'list' field stores integer keys mapped to display values. If
// the new field will have fewer values, and any data exists for the
// abandonded keys, the field will have no way to display them. So,
// abandoned keys, the field will have no way to display them. So,
// forbid such an update.
if ($has_data && count($field['settings']['allowed_values']) < count($prior_field['settings']['allowed_values'])) {
// Identify the keys that will be lost.
......
......@@ -80,7 +80,7 @@ class FieldUITestCase extends DrupalWebTestCase {
* Test adding a new field.
*
* @todo Assert properties can bet set in the form and read back in $field and
* $insatnces.
* $instances.
*/
function createField() {
// Create a test field.
......
......@@ -596,8 +596,8 @@ class FilterUnitTestCase extends DrupalUnitTestCase {
/**
* Test limiting allowed tags, XSS prevention and adding 'nofollow' to links.
*
* XSS tests assume that script is dissallowed on default and src is allowed
* on default, but on* and style are dissallowed.
* XSS tests assume that script is disallowed on default and src is allowed
* on default, but on* and style are disallowed.
*
* Script injection vectors mostly adopted from http://ha.ckers.org/xss.html.
*
......
......@@ -107,7 +107,7 @@ function locale_languages_overview_form_submit($form, &$form_state) {
if ($form_state['values']['site_default'] == $langcode || $default->language == $langcode) {
// Automatically enable the default language and the language
// which was default previously (because we will not get the
// value from that disabled checkox).
// value from that disabled checkbox).
$form_state['values']['enabled'][$langcode] = 1;
}
if ($form_state['values']['enabled'][$langcode]) {
......@@ -535,7 +535,7 @@ function _locale_languages_configure_form_language_table(&$form, $type) {
$provider = $language_providers[$id];
// List the provider only if the current type is defined in its 'types' key.
// If it is not defined default to all the configurabe language types.
// If it is not defined default to all the configurable language types.
$types = array_flip(isset($provider['types']) ? $provider['types'] : $form['#language_types']);
if (isset($types[$type])) {
......
......@@ -634,12 +634,12 @@ function hook_node_view_alter($build) {
* - "body_label": the label for the body field of this content type. Optional
* (defaults to 'Body').
* - "locked": boolean indicating whether the administrator can change the
* machine name of this type. FALSE = changable (not locked),
* TRUE = unchangable (locked). Optional (defaults to TRUE).
* machine name of this type. FALSE = changeable (not locked),
* TRUE = unchangeable (locked). Optional (defaults to TRUE).
*
* The machine-readable name of a node type should contain only letters,
* numbers, and underscores. Underscores will be converted into hyphens for the
* purpose of contructing URLs.
* purpose of constructing URLs.
*
* All attributes of a node type that are defined through this hook (except for
* 'locked') can be edited by a site administrator. This includes the
......@@ -694,7 +694,7 @@ function hook_node_info() {
* not need to take the weighted system into account, as it will be done
* automatically. It does, however, need to calculate a decimal between
* 0 and 1; be careful not to cast the entire score to an integer by
* inadvertantly introducing a variable argument. Required.
* inadvertently introducing a variable argument. Required.
* - "arguments": if any arguments are required for the score, they can be
* specified in an array here.
*/
......