Commit 92a8adea authored by Dries's avatar Dries

- Patch #352470 by scor: fixed typos and grammar in comments.

parent cac5dd8a
......@@ -1191,7 +1191,7 @@ function drupal_maintenance_theme() {
}
/**
* Return the name of the localisation function. Use in code that needs to
* Return the name of the localization function. Use in code that needs to
* run both during installation and normal operation.
*/
function get_t() {
......
......@@ -1900,7 +1900,7 @@ function drupal_eval($code) {
$old_theme_path = $theme_path;
// Restore theme_path to the theme, as long as drupal_eval() executes,
// so code evaluted will not see the caller module as the current theme.
// so code evaluated will not see the caller module as the current theme.
// If theme info is not initialized get the path from theme_default.
if (!isset($theme_info)) {
$theme_path = drupal_get_path('theme', $conf['theme_default']);
......@@ -2650,7 +2650,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL) {
*
* Please note that this function should be called from the theme layer, such as
* in a .tpl.php file, theme_ function, or in a template_preprocess function,
* not in a form declartion. Though the same JavaScript could be added to the
* not in a form declaration. Though the same JavaScript could be added to the
* page using drupal_add_js() directly, this function helps keep template files
* clean and readable. It also prevents tabledrag.js from being added twice
* accidentally.
......
......@@ -288,7 +288,7 @@ function __construct($dsn, $username, $password, $driver_options = array()) {
*
* throw_exception - By default, the database system will catch any errors
* on a query as an Exception, log it, and then rethrow it so that code
* further up the call chain can take an appropriate action. To supress
* further up the call chain can take an appropriate action. To suppress
* that behavior and simply return NULL on failure, set this option to FALSE.
*
* @return
......@@ -1950,7 +1950,7 @@ function db_type_placeholder($type) {
return '\'%s\'';
case 'numeric':
// Numeric values are arbitrary precision numbers. Syntacically, numerics
// Numeric values are arbitrary precision numbers. Syntactically, numerics
// should be specified directly in SQL. However, without single quotes
// the %s placeholder does not protect against non-numeric characters such
// as spaces which would expose us to SQL injection.
......@@ -2304,7 +2304,7 @@ function _db_query_process_args($query, $args, $options) {
$options['target'] = 'default';
}
// Temporary backward-compatibliity hacks. Remove later.
// Temporary backward-compatibility hacks. Remove later.
$old_query = $query;
$query = str_replace(array('%n', '%d', '%f', '%b', "'%s'", '%s'), '?', $old_query);
if ($old_query !== $query) {
......
......@@ -407,7 +407,7 @@ public function fields($table_alias, array $fields = array()) {
* Adds an expression to the list of "fields" to be SELECTed.
*
* An expression can be any arbitrary string that is valid SQL. That includes
* various functions, which may in some cases be database-dependant. This
* various functions, which may in some cases be database-dependent. This
* method makes no effort to correct for database-specific functions.
*
* @param $expression
......@@ -559,7 +559,7 @@ public function rightJoin($table, $alias = NULL, $condition = NULL, $arguments =
* insert should be passed in the 4th parameter. For the first table joined
* on a query, this value is ignored as the first table is taken as the base
* table.
* @param $argments
* @param $arguments
* An array of arguments to replace into the $condition of this join.
* @return
* The unique alias that was assigned for this table.
......
......@@ -747,7 +747,7 @@ function file_unmanaged_delete($path) {
if (is_file($path)) {
return unlink($path);
}
// Return TRUE for non-existant file, but log that nothing was actually
// Return TRUE for non-existent file, but log that nothing was actually
// deleted, as the current state is the indended result.
if (!file_exists($path)) {
watchdog('file', 'The file %path was not deleted, because it does not exist.', array('%path' => $path), WATCHDOG_NOTICE);
......
......@@ -48,7 +48,7 @@
/**
* Retrieves a form from a constructor function, or from the cache if
* the form was built in a previous page-load. The form is then passesed
* the form was built in a previous page-load. The form is then passed
* on for processing, after and rendered for display if necessary.
*
* @param $form_id
......@@ -399,7 +399,7 @@ function drupal_process_form($form_id, &$form, &$form_state) {
// form_clean_id() maintains a cache of element IDs it has seen,
// so it can prevent duplicates. We want to be sure we reset that
// cache when a form is processed, so scenerios that result in
// cache when a form is processed, so scenarios that result in
// the form being built behind the scenes and again for the
// browser don't increment all the element IDs needlessly.
form_clean_id(NULL, TRUE);
......@@ -422,7 +422,7 @@ function drupal_process_form($form_id, &$form, &$form_state) {
// drupal_execute).
if ($batch =& batch_get() && !isset($batch['current_set'])) {
// The batch uses its own copies of $form and $form_state for
// late execution of submit handers and post-batch redirection.
// late execution of submit handlers and post-batch redirection.
$batch['form'] = $form;
$batch['form_state'] = $form_state;
$batch['progressive'] = !$form['#programmed'];
......@@ -929,7 +929,7 @@ function form_builder($form_id, $form, &$form_state) {
// Internet Explorer button-click scenario.
_form_builder_ie_cleanup($form, $form_state);
// We shoud keep the buttons array until the IE clean up function
// We should keep the buttons array until the IE clean up function
// has recognized the submit button so the form has been marked
// as submitted. If we already know which button was submitted,
// we don't need the array.
......@@ -1881,7 +1881,7 @@ function form_process_ahah($element) {
// submission via pressing the enter key triggers a click event on
// submit inputs, inappropriately triggering AHAH behaviors.
$element['#ahah']['event'] = 'mousedown';
// Attach an additional event handler so that AHAH behaviours
// Attach an additional event handler so that AHAH behaviors
// can be triggered still via keyboard input.
$element['#ahah']['keypress'] = TRUE;
break;
......
......@@ -234,7 +234,7 @@ function image_resize($source, $destination, $width, $height) {
* @param $degrees
* The number of (clockwise) degrees to rotate the image.
* @param $background
* An hexidecimal integer specifying the background color to use for the
* An hexadecimal integer specifying the background color to use for the
* uncovered area of the image after the rotation. E.g. 0x000000 for black,
* 0xff00ff for magenta, and 0xffffff for white.
* @return
......
......@@ -226,7 +226,7 @@ function drupal_detect_database_types() {
}
}
// Usability: unconditionnally put the MySQL driver on top.
// Usability: unconditionally put the MySQL driver on top.
if (isset($databases['mysql'])) {
$mysql_database = $databases['mysql'];
unset($databases['mysql']);
......
......@@ -99,7 +99,7 @@ function language_from_browser() {
}
/**
* Rewrite URL's with language based prefix. Parameters are the same
* Rewrite URLs with language based prefix. Parameters are the same
* as those of the url() function.
*/
function language_url_rewrite(&$path, &$options) {
......
......@@ -188,7 +188,7 @@ function drupal_mail_send($message) {
// They will appear correctly in the actual e-mail that is sent.
str_replace("\r", '', $message['body']),
// For headers, PHP's API suggests that we use CRLF normally,
// but some MTAs incorrecly replace LF with CRLF. See #234403.
// but some MTAs incorrectly replace LF with CRLF. See #234403.
join("\n", $mimeheaders)
);
}
......
......@@ -444,7 +444,7 @@ function _menu_load_objects(&$item, &$map) {
foreach ($args as $i => $arg) {
if ($arg === '%index') {
// Pass on argument index to the load function, so multiple
// occurances of the same placeholder can be identified.
// occurrences of the same placeholder can be identified.
$args[$i] = $index;
}
if ($arg === '%map') {
......@@ -734,7 +734,7 @@ function _menu_link_translate(&$item) {
* infinite recursion.
*
* @param $type
* Type of the object. These appear in hook_menu definitons as %type. Core
* Type of the object. These appear in hook_menu definitions as %type. Core
* provides aggregator_feed, aggregator_category, contact, filter_format,
* forum_term, menu, menu_link, node, taxonomy_vocabulary, user. See the
* relevant {$type}_load function for more on each. Defaults to node.
......@@ -2185,7 +2185,7 @@ function _menu_clear_page_cache() {
static $cache_cleared = 0;
// Clear the page and block caches, but at most twice, including at
// the end of the page load when there are multple links saved or deleted.
// the end of the page load when there are multiple links saved or deleted.
if (empty($cache_cleared)) {
cache_clear_all();
// Keep track of which menus have expanded items.
......
......@@ -1379,7 +1379,7 @@ function theme_table($header, $rows, $attributes = array(), $caption = NULL, $co
// Format the table header:
if (count($header)) {
$ts = tablesort_init($header);
// HTML requires that the thead tag has tr tags in it follwed by tbody
// HTML requires that the thead tag has tr tags in it followed by tbody
// tags. Using ternary operator to check and see if we have any rows.
$output .= (count($rows) ? ' <thead><tr>' : ' <tr>');
foreach ($header as $cell) {
......@@ -1816,7 +1816,7 @@ function template_preprocess(&$variables, $hook) {
* based on the current path.
*
* Any changes to variables in this preprocessor should also be changed inside
* template_preprocess_maintenance_page() to keep all them consistent.
* template_preprocess_maintenance_page() to keep all of them consistent.
*
* The $variables array contains the following arguments:
* - $content
......
......@@ -357,7 +357,7 @@ Drupal.tableDrag.prototype.makeDraggable = function(item) {
});
// Compatibility addition, return false on keypress to prevent unwanted scrolling.
// IE and Safari will supress scrolling on keydown, but all other browsers
// IE and Safari will suppress scrolling on keydown, but all other browsers
// need to return false on keypress. http://www.quirksmode.org/js/keys.html
handle.keypress(function(event) {
switch (event.keyCode) {
......@@ -592,7 +592,7 @@ Drupal.tableDrag.prototype.findDropTargetRow = function(x, y) {
Drupal.tableDrag.prototype.updateFields = function(changedRow) {
for (var group in this.tableSettings) {
// Each group may have a different setting for relationship, so we find
// the source rows for each seperately.
// the source rows for each separately.
this.updateField(changedRow, group);
}
};
......@@ -653,7 +653,7 @@ Drupal.tableDrag.prototype.updateField = function(changedRow, group) {
// Otherwise we went all the way to the left of the table without finding
// a parent, meaning this item has been placed at the root level.
else {
// Use the first row in the table as source, because it's garanteed to
// Use the first row in the table as source, because it's guaranteed to
// be at the root level. Find the first item, then compare this row
// against it as a sibling.
sourceRow = $('tr.draggable:first').get(0);
......@@ -775,7 +775,7 @@ Drupal.tableDrag.prototype.setScroll = function(scrollAmount) {
};
Drupal.tableDrag.prototype.restripeTable = function() {
// :even and :odd are reversed because jquery counts from 0 and
// :even and :odd are reversed because jQuery counts from 0 and
// we count from 1, so we're out of sync.
$('tr.draggable', this.table)
.filter(':odd').filter('.odd')
......@@ -1019,7 +1019,7 @@ Drupal.tableDrag.prototype.row.prototype.findSiblings = function(rowSettings) {
// Check that the sibling contains a similar target field.
if ($('.' + rowSettings.target, checkRow)) {
// Either add immediately if this is a flat table, or check to ensure
// that this row has the same level of indentaiton.
// that this row has the same level of indentation.
if (this.indentEnabled) {
var checkRowIndentation = $('.indentation', checkRow).length
}
......
......@@ -29,7 +29,7 @@ Drupal.behaviors.tableHeader = {
// Store parent table.
var table = $(this).parent('table')[0];
headerClone.table = table;
// Finish initialzing header positioning.
// Finish initializing header positioning.
tracker(headerClone);
$(table).addClass('sticky-table');
......
......@@ -527,7 +527,7 @@ function _block_render_blocks($region_blocks) {
* constants). Two block instances can use the same cached content when
* they share the same cache_id.
*
* Theme and language contexts are automatically differenciated.
* Theme and language contexts are automatically differentiated.
*
* @param $block
* @return
......
......@@ -19,7 +19,7 @@ class BlockTestCase extends DrupalWebTestCase {
$admin_user = $this->drupalCreateUser(array('administer blocks', 'administer filters'));
$this->drupalLogin($admin_user);
// Define the exising regions
// Define the existing regions
$this->regions = array();
$this->regions[] = array('name' => 'header', 'id' => 'header-region');
$this->regions[] = array('name' => 'left', 'id' => 'sidebar-left');
......
......@@ -831,7 +831,7 @@ function blogapi_menu() {
}
/**
* Implementaton of hook_init().
* Implementation of hook_init().
*/
function blogapi_init() {
if (drupal_is_front_page()) {
......
......@@ -19,7 +19,7 @@ class BlogAPITestCase extends DrupalWebTestCase {
*/
function testBlogAPI() {
global $base_url;
// Create admin user and taxononmy for later use.
// Create admin user and taxonomy for later use.
$admin_user = $this->drupalCreateUser(array('administer taxonomy'));
$this->drupalLogin($admin_user);
$vid = $this->addVocabulary('simpletest_vocab');
......@@ -53,7 +53,7 @@ class BlogAPITestCase extends DrupalWebTestCase {
// Check recent posts.
$result = xmlrpc($local, 'blogger.getRecentPosts', $appid, $blog_id, $web_user->name, $web_user->pass_raw, 5);
$this->assertTrue($result, t('Recent post list retreived.'));
$this->assertTrue($result, t('Recent post list retrieved.'));
if ($result !== FALSE && array_key_exists('title', $result[0])) {
$this->assertEqual($content, $result[0]['title'], t('Post found.'));
......@@ -89,7 +89,7 @@ class BlogAPITestCase extends DrupalWebTestCase {
// Get post categories.
$result = xmlrpc($local, 'mt.getPostCategories', $nid, $web_user->name, $web_user->pass_raw);
$this->assertTrue($result, t('Category list successfully retreived.'));
$this->assertTrue($result, t('Category list successfully retrieved.'));
if ($result !== FALSE && array_key_exists('categoryId', $result[0])) {
$this->assertEqual($term, $result[0]['categoryId'], t('Category list verified.'));
......@@ -134,8 +134,9 @@ class BlogAPITestCase extends DrupalWebTestCase {
*
* @param integer $vid
* Vocabulary ID.
* @param string $term Term name.
* @return interger
* @param string $term
* Term name.
* @return integer
* The Term ID.
*/
function addTerm($vid, $term) {
......
......@@ -141,7 +141,7 @@ function book_update_6000() {
return $ret;
}
else {
// No exising nodes in the hierarchy, so drop the table and re-create it.
// No existing nodes in the hierarchy, so drop the table and re-create it.
$ret[] = update_sql("DROP TABLE {book}");
db_create_table($ret, 'book', $schema['book']);
return $ret;
......
......@@ -74,7 +74,7 @@ function _color_page_alter(&$vars) {
$color_paths = variable_get('color_' . $theme_key . '_stylesheets', array());
if (!empty($color_paths)) {
// Loop over theme CSS files and try to rebuild CSS array with rewritten
// stylesheets. Keep the orginal order intact for CSS cascading.
// stylesheets. Keep the original order intact for CSS cascading.
$new_theme_css = array();
foreach ($vars['css']['all']['theme'] as $old_path => $old_preprocess) {
......
......@@ -483,7 +483,7 @@ class CommentApprovalTest extends CommentHelperCase {
function testApprovalAdminInterface() {
$this->drupalLogin($this->admin_user);
// Set anonymouse comments to require approval.
// Set anonymous comments to require approval.
$this->setAnonymousUserComment(TRUE, FALSE);
$this->setCommentAnonymous('0'); // Ensure that doesn't require contact info.
$this->drupalLogout();
......@@ -517,7 +517,7 @@ class CommentApprovalTest extends CommentHelperCase {
function testApprovalNodeInterface() {
$this->drupalLogin($this->admin_user);
// Set anonymouse comments to require approval.
// Set anonymous comments to require approval.
$this->setAnonymousUserComment(TRUE, FALSE);
$this->setCommentAnonymous('0'); // Ensure that doesn't require contact info.
$this->drupalLogout();
......@@ -528,7 +528,7 @@ class CommentApprovalTest extends CommentHelperCase {
$this->postComment($this->node, $subject, $body, TRUE, TRUE); // Set $contact to true so that it won't check for id and message.
$this->assertText(t('Your comment has been queued for moderation by site administrators and will be published after approval.'), t('Comment requires approval.'));
// Get unaproved comment id.
// Get unapproved comment id.
$this->drupalLogin($this->admin_user);
$anonymous_comment4 = $this->getUnapprovedComment($subject);
$anonymous_comment4 = (object) array('id' => $anonymous_comment4, 'subject' => $subject, 'comment' => $body);
......
......@@ -21,7 +21,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase {
* Test configuration options and site-wide contact form.
*/
function testSiteWideContact() {
// Create and login administative user.
// Create and login administrative user.
$admin_user = $this->drupalCreateUser(array('administer site-wide contact form', 'administer permissions'));
$this->drupalLogin($admin_user);
......
......@@ -51,7 +51,7 @@
* and with what settings. Filters that provide settings should usually store
* these settings per format.
*
* If the filter's behaviour depends on an extensive list and/or external data
* If the filter's behavior depends on an extensive list and/or external data
* (e.g. a list of smileys, a list of glossary terms) then filters are allowed
* to provide a separate, global configuration page rather than provide settings
* per format. In that case, there should be a link from the format-specific
......
......@@ -954,7 +954,7 @@ function filter_xss($string, $allowed_tags = array('a', 'em', 'strong', 'cite',
}
// Store the input format
_filter_xss_split($allowed_tags, TRUE);
// Remove NUL characters (ignored by some browsers)
// Remove NULL characters (ignored by some browsers)
$string = str_replace(chr(0), '', $string);
// Remove Netscape 4 JS entities
$string = preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
......
......@@ -58,7 +58,7 @@ function hook_help($path, $arg) {
case 'admin/build/block':
return t('<p>Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. They are usually generated automatically by modules, but administrators can create blocks manually.</p>
<p>If you want certain blocks to disable themselves temporarily during high server loads, check the "Throttle" box. You can configure the auto-throttle on the <a href="@throttle">throttle configuration page</a> after having enabled the throttle module.</p>
<p>You can configure the behaviour of each block (for example, specifying on which pages and for what users it will appear) by clicking the "configure" link for each block.</p>', array('@throttle' => url('admin/settings/throttle')));
<p>You can configure the behavior of each block (for example, specifying on which pages and for what users it will appear) by clicking the "configure" link for each block.</p>', array('@throttle' => url('admin/settings/throttle')));
}
}
......
......@@ -3,7 +3,7 @@
/**
* @file
* Administrative page callbaks for menu module.
* Administrative page callbacks for menu module.
*/
/**
......
......@@ -136,7 +136,7 @@ function menu_menu() {
}
/**
* Implemenation of hook_theme().
* Implementation of hook_theme().
*/
function menu_theme() {
return array(
......
......@@ -783,7 +783,7 @@ function node_load_multiple($nids = array(), $conditions = array(), $reset = FAL
}
// Exclude any nodes loaded from cache if they don't match $conditions.
// This ensures the same behaviour whether loading from memory or database.
// This ensures the same behavior whether loading from memory or database.
if ($conditions) {
foreach ($nodes as $node) {
$node_values = (array) $node;
......@@ -1024,7 +1024,7 @@ function node_save(&$node) {
$node->old_vid = $node->vid;
}
else {
// When updating a node, avoid clobberring an existing log entry with an empty one.
// When updating a node, avoid clobbering an existing log entry with an empty one.
if (empty($node->log)) {
unset($node->log);
}
......@@ -1077,7 +1077,7 @@ function node_save(&$node) {
/**
* Helper function to save a revision with the uid of the current user.
*
* Node is taken by reference, becuse drupal_write_record() updates the
* Node is taken by reference, because drupal_write_record() updates the
* $node with the revision id, and we need to pass that back to the caller.
*/
function _node_save_revision(&$node, $uid, $update = NULL) {
......@@ -1607,7 +1607,7 @@ function node_menu() {
$items['admin/content/node-settings/rebuild'] = array(
'title' => 'Rebuild permissions',
'page arguments' => array('node_configure_rebuild_confirm'),
// Any user than can potentially trigger a node_acess_needs_rebuild(TRUE)
// Any user than can potentially trigger a node_access_needs_rebuild(TRUE)
// has to be allowed access to the 'node access rebuild' confirm form.
'access arguments' => array('access administration pages'),
'type' => MENU_CALLBACK,
......@@ -2065,7 +2065,7 @@ function node_form_alter(&$form, $form_state, $form_id) {
* Form API callback for the search form. Registered in node_form_alter().
*/
function node_search_validate($form, &$form_state) {
// Initialise using any existing basic search keywords.
// Initialize using any existing basic search keywords.
$keys = $form_state['values']['processed_keys'];
// Insert extra restrictions into the search keywords string.
......@@ -2519,7 +2519,7 @@ function node_access_rebuild($batch_mode = FALSE) {
$result = db_query("SELECT nid FROM {node}");
while ($node = db_fetch_object($result)) {
$loaded_node = node_load($node->nid, NULL, TRUE);
// To preserve database integrity, only aquire grants if the node
// To preserve database integrity, only acquire grants if the node
// loads successfully.
if (!empty($loaded_node)) {
node_access_acquire_grants($loaded_node);
......@@ -2542,7 +2542,7 @@ function node_access_rebuild($batch_mode = FALSE) {
/**
* Batch operation for node_access_rebuild_batch.
*
* This is a mutlistep operation : we go through all nodes by packs of 20.
* This is a multistep operation : we go through all nodes by packs of 20.
* The batch processing engine interrupts processing and sends progress
* feedback after 1 second execution time.
*/
......@@ -2559,7 +2559,7 @@ function _node_access_rebuild_batch_operation(&$context) {
$result = db_query_range("SELECT nid FROM {node} WHERE nid > %d ORDER BY nid ASC", $context['sandbox']['current_node'], 0, $limit);
while ($row = db_fetch_array($result)) {
$loaded_node = node_load($row['nid'], NULL, TRUE);
// To preserve database integrity, only aquire grants if the node
// To preserve database integrity, only acquire grants if the node
// loads successfully.
if (!empty($loaded_node)) {
node_access_acquire_grants($loaded_node);
......
......@@ -304,7 +304,7 @@ function node_body_field(&$node, $label, $word_count) {
}
/**
* Button sumit function: handle the 'Delete' button on the node form.
* Button submit function: handle the 'Delete' button on the node form.
*/
function node_form_delete_submit($form, &$form_state) {
$destination = '';
......
......@@ -130,7 +130,7 @@ class NodeRevisionsTestCase extends DrupalWebTestCase {
}
/**
* Check node revision related opperations.
* Check node revision related operations.
*/
function testRevisions() {
$nodes = $this->nodes;
......
......@@ -422,7 +422,7 @@ function openid_authentication($response) {
else {
unset($form_state['values']['response']);
$account = user_save('', $form_state['values']);
// Terminate if an error occured during user_save().
// Terminate if an error occurred during user_save().
if (!$account) {
drupal_set_message(t("Error saving user account."), 'error');
drupal_goto();
......@@ -489,7 +489,7 @@ function openid_authentication_request($claimed_id, $identity, $return_to = '',
* Attempt to verify the response received from the OpenID Provider.
*
* @param $op_endpoint The OpenID Provider URL.
* @param $response Array of repsonse values from the provider.
* @param $response Array of response values from the provider.
*
* @return boolean
*/
......
......@@ -31,7 +31,7 @@ function profile_admin_overview() {
$form[$field->fid]['delete'] = array('#markup' => l(t('delete'), "admin/user/profile/delete/$field->fid"));
}
// Add the cateogory combo boxes
// Add the category combo boxes
$categories = array_unique($categories);
foreach ($form as $fid => $field) {
foreach ($categories as $cat => $category) {
......@@ -114,7 +114,7 @@ function theme_profile_admin_overview($form) {
$rows[] = array(array('data' => $category, 'colspan' => 7, 'class' => 'category'));
$rows[] = array('data' => array(array('data' => '<em>' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '</em>', 'colspan' => 7)), 'class' => 'category-' . $category_number . '-message category-message category-populated');
// Make it dragable only if there is more than one field
// Make it draggable only if there is more than one field
if (isset($form['submit'])) {
drupal_add_tabledrag('profile-fields', 'order', 'sibling', 'profile-weight', 'profile-weight-' . $category_number);
drupal_add_tabledrag('profile-fields', 'match', 'sibling', 'profile-category', 'profile-category-' . $category_number);
......
......@@ -18,7 +18,7 @@
*
* Since $search is keyed, a direct print of the form element is possible.
* Modules can add to the search form so it is recommended to check for their
* existance before printing. The default keys will always exist.
* existence before printing. The default keys will always exist.
*
* <?php if (isset($search['extra_field'])): ?>
* <div class="extra-field">
......
......@@ -30,7 +30,7 @@
*
* Since $info_split is keyed, a direct print of the item is possible.
* This array does not apply to user searches so it is recommended to check
* for their existance before printing. The default keys of 'type', 'user' and
* for their existence before printing. The default keys of 'type', 'user' and
* 'date' always exist for node searches. Modules may provide other data.
*
* <?php if (isset($info_split['comment'])) : ?>
......
......@@ -6,7 +6,7 @@
* Default theme implementation for displaying search results.
*
* This template collects each invocation of theme_search_result(). This and
* the child template are dependant to one another sharing the markup for
* the child template are dependent to one another sharing the markup for
* definition lists.
*
* Note that modules may implement their own search type and theme function
......
......@@ -18,7 +18,7 @@
*
* Since $search is keyed, a direct print of the form element is possible.
* Modules can add to the search form so it is recommended to check for their
* existance before printing. The default keys will always exist.
* existence before printing. The default keys will always exist.
*
* <?php if (isset($search['extra_field'])): ?>
* <div class="extra-field">
......
......@@ -462,7 +462,7 @@ function search_index($sid, $type, $text) {
// and begins and ends with a literal (inserting $null as required).
$tag = FALSE; // Odd/even counter. Tag or no tag.
$link = FALSE; // State variable for link analyser
$link = FALSE; // State variable for link analyzer
$score = 1; // Starting score per word
$accum = ' '; // Accumulator for cleaned up data
$tagstack = array(); // Stack with open tags
......@@ -715,9 +715,9 @@ function search_query_insert($keys, $option, $value = '') {
* * Arguments for this query part.
* * A series of exact word matches OR'd together.
* * Arguments for this query part.
* * A bool indicating whether this is a simple query or not. Negative
* * A boolean indicating whether this is a simple query or not. Negative
* terms, presence of both AND / OR make this FALSE.
* * A bool indicating the presence of a lowercase or. Maybe the user
* * A boolean indicating the presence of a lowercase or. Maybe the user
* wanted to use OR.
*/
function search_parse_query($text) {
......
......@@ -193,7 +193,7 @@ protected function getAssertionCall() {
$backtrace = debug_backtrace();
// The first element is the call. The second element is the caller.
// We skip calls that occured in one of the methods of DrupalWebTestCase
// We skip calls that occurred in one of the methods of DrupalWebTestCase
// or in an assertion function.
while (($caller = $backtrace[1]) &&
((isset($caller['class']) && $caller['class'] == 'DrupalWebTestCase') ||
......@@ -1000,7 +1000,7 @@ protected function curlClose() {
*/
protected function parse() {
if (!$this->elements) {
// DOM can load HTML soup. But, HTML soup can throw warnings, supress
// DOM can load HTML soup. But, HTML soup can throw warnings, suppress
// them.
@$htmlDom = DOMDocument::loadHTML($this->content);
if ($htmlDom) {
......@@ -1063,7 +1063,7 @@ protected function drupalGet($path, array $options = array(), array $headers = a
* $edit = array(...);
* $this->drupalPost(NULL, $edit, t('Save'));
* @param $edit
* Field data in an assocative array. Changes the current input fields
* Field data in an associative array. Changes the current input fields
* (where possible) to the values indicated. A checkbox can be set to
* TRUE to be checked and FALSE to be unchecked. Note that when a form
* contains file upload fields, other fields cannot start with the '@'
......@@ -1314,7 +1314,7 @@ protected function handleForm(&$post, &$edit, &$upload, $submit, $form) {
}
/**
* Peform an xpath search on the contents of the internal browser. The search
* Perform an xpath search on the contents of the internal browser. The search
* is relative to the root element (HTML tag normally) of the page.
*
* @param $xpath
......@@ -1606,7 +1606,7 @@ protected function assertNoRaw($raw, $message = '%s found', $group = 'Other') {
/**
* Pass if the text IS found on the text version of the page. The text version
* is the equivilent of what a user would see when viewing through a web browser.
* is the equivalent of what a user would see when viewing through a web browser.
* In other words the HTML has been filtered out of the contents.
*
* @param $text
......@@ -1624,7 +1624,7 @@ protected function assertText($text, $message = '', $group = 'Other') {
/**
* Pass if the text is NOT found on the text version of the page. The text version
* is the equivilent of what a user would see when viewing through a web browser.
* is the equivalent of what a user would see when viewing through a web browser.
* In other words the HTML has been filtered out of the contents.
*
* @param $text
......@@ -1956,7 +1956,7 @@ protected function constructFieldXpath($attribute, $value) {
* Assert the page responds with the specified response code.
*
* @param $code
* Reponse code. For example 200 is a successful page request. For a list
* Response code. For example 200 is a successful page request. For a list
* of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
* @param $message
* Message to display.
......
......@@ -43,7 +43,7 @@ function simpletest_perm() {
}
/**
* Implemenation of hook_theme().
* Implementation of hook_theme().
*/
function simpletest_theme() {
return array(
......@@ -520,7 +520,7 @@ function simpletest_clean_environment() {
}
/**
* Removed prefixed talbes from the database that are left over from crashed tests.
* Removed prefixed tables from the database that are left over from crashed tests.
*/
function simpletest_clean_database() {
$tables = db_find_tables(Database::getActiveConnection()->prefixTables('{simpletest}') . '%');
......@@ -565,7 +565,7 @@ function simpletest_clean_temporary_directories() {
}
/**
* Remove all files from specified firectory and then remove directory.
* Remove all files from specified directory and then remove directory.
*
* @param string $path Directory path.
*/
......
......@@ -9,7 +9,7 @@ class SimpleTestTestCase extends DrupalWebTestCase {
/**
* Store the test ID from each test run for comparison, to ensure they are
* incramenting.
* incrementing.
*/
protected $test_ids = array();
......
......@@ -1558,7 +1558,7 @@ class DatabaseTaggingTestCase extends DatabaseTestCase {
$this->assertEqual($data, $return, t('Corect metadata returned.'));
$return = $query->getMetaData('nothere');
$this->assertNull($return, t('Non-existant key returned NULL.'));
$this->assertNull($return, t('Non-existent key returned NULL.'));
}