Commit 92a8adea authored by Dries's avatar Dries
Browse files

- 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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment