Commit 0c63d9e2 authored by Dries's avatar Dries

- Patch #349504 by keith.smith: clean up sentence spacing in code comments.

parent ee700371
......@@ -8,7 +8,7 @@ the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
......
......@@ -315,8 +315,8 @@ function timer_stop($name) {
* 13. $confdir/default
*
* If a file named sites.php is present in the $confdir, it will be loaded
* prior to scanning for directories. It should define an associative array
* named $sites, which maps domains to directories. It should be in the form
* prior to scanning for directories. It should define an associative array
* named $sites, which maps domains to directories. It should be in the form
* of:
*
* $sites = array(
......@@ -334,7 +334,7 @@ function timer_stop($name) {
* "example.com" in the sites directory whenever a request comes from
* "example.com", "devexample.com", or "localhost/example". That is useful
* on development servers, where the domain name may not be the same as the
* domain of the live server. Since Drupal stores file paths into the database
* domain of the live server. Since Drupal stores file paths into the database
* (files, system table, etc.) this will ensure the paths are correct while
* accessed on development servers.
*
......@@ -409,7 +409,7 @@ function drupal_initialize_variables() {
* Validate that $_SERVER['HTTP_HOST'] is safe.
*
* As $_SERVER['HTTP_HOST'] is user input, ensure it only contains characters
* allowed in hostnames. See RFC 952 (and RFC 2181). $_SERVER['HTTP_HOST'] is
* allowed in hostnames. See RFC 952 (and RFC 2181). $_SERVER['HTTP_HOST'] is
* lowercased.
*
* @return
......@@ -548,7 +548,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
// nothing
}
// Verify that we have an active database connection, before querying
// the database. This is required because this function is called both
// the database. This is required because this function is called both
// before we have a database connection (i.e. during installation) and
// when a database connection fails.
elseif (db_is_active() && (($file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField()) && file_exists($file))) {
......@@ -708,7 +708,7 @@ function drupal_load($type, $name) {
* Set HTTP headers in preparation for a page response.
*
* Authenticated users are always given a 'no-cache' header, and will
* fetch a fresh page on every request. This prevents authenticated
* fetch a fresh page on every request. This prevents authenticated
* users seeing locally cached pages that show them as logged out.
*
* @see page_set_cache()
......@@ -724,7 +724,7 @@ function drupal_page_header() {
* Set HTTP headers in preparation for a cached page response.
*
* The general approach here is that anonymous users can keep a local
* cache of the page, but must revalidate it on every request. Then,
* cache of the page, but must revalidate it on every request. Then,
* they are given a '304 Not Modified' response as long as they stay
* logged out and the page has not been modified.
*
......@@ -887,8 +887,8 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO
static $in_error_state = FALSE;
// It is possible that the error handling will itself trigger an error. In that case, we could
// end up in an infinite loop. To avoid that, we implement a simple static semaphore.
// It is possible that the error handling will itself trigger an error. In that case, we could
// end up in an infinite loop. To avoid that, we implement a simple static semaphore.
if (!$in_error_state) {
$in_error_state = TRUE;
......@@ -1064,7 +1064,7 @@ function drupal_bootstrap($phase = NULL) {
}
/**
* Return the current bootstrap phase for this Drupal process. The
* Return the current bootstrap phase for this Drupal process. The
* current phase is the one most recently completed by
* drupal_bootstrap().
*
......@@ -1101,7 +1101,7 @@ function _drupal_bootstrap($phase) {
break;
case DRUPAL_BOOTSTRAP_DATABASE:
// Initialize the database system. Note that the connection
// Initialize the database system. Note that the connection
// won't be initialized until it is actually requested.
require_once DRUPAL_ROOT . '/includes/database/database.inc';
// Register autoload functions so that we can access classes and interfaces.
......@@ -1268,7 +1268,7 @@ function language_default($property = NULL) {
/**
* If Drupal is behind a reverse proxy, we use the X-Forwarded-For header
* instead of $_SERVER['REMOTE_ADDR'], which would be the IP address of
* the proxy server, and not the client's. If Drupal is run in a cluster
* the proxy server, and not the client's. If Drupal is run in a cluster
* we use the X-Cluster-Client-Ip header instead.
*
* @param $reset
......@@ -1344,7 +1344,7 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
// was last called with, which is not always what you want.
// module_load_all_includes() calls module_list(), but if this function
// is called very early in the bootstrap process then it will be
// uninitialized and therefore return no modules. Instead, we have to
// uninitialized and therefore return no modules. Instead, we have to
// "prime" module_list() here to to values we want, specifically
// "yes rebuild the list and don't limit to bootstrap".
// TODO: Remove this call after http://drupal.org/node/222109 is fixed.
......
......@@ -1532,7 +1532,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
*
* @param $path
* The Drupal path being linked to, such as "admin/content/node", or an
* existing URL like "http://drupal.org/". The special path
* existing URL like "http://drupal.org/". The special path
* '<front>' may also be given and will generate the site's base URL.
* @param $options
* An associative array of additional options, with the following keys:
......@@ -2777,7 +2777,7 @@ function drupal_random_bytes($count) {
// Note that it may be important that our $random_state is passed
// through md5() prior to being rolled into $output, that the two md5()
// invocations are different, and that the extra input into the first one -
// the microtime() - is prepended rather than appended. This is to avoid
// the microtime() - is prepended rather than appended. This is to avoid
// directly leaking $random_state via the $output stream, which could
// allow for trivial prediction of further "random" numbers.
while (strlen($output) < $count) {
......@@ -3045,7 +3045,7 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
$searchdir[] = 'sites/all/' . $directory;
// The 'profiles' directory contains pristine collections of modules and
// themes as organized by a distribution. It is pristine in the same way
// themes as organized by a distribution. It is pristine in the same way
// that /modules is pristine for core; users should avoid changing anything
// there in favor of sites/all or sites/<domain> directories.
if (file_exists("profiles/$profile/$directory")) {
......
This diff is collapsed.
......@@ -11,7 +11,7 @@
*
* We log queries in a separate object rather than in the connection object
* because we want to be able to see all queries sent to a given database, not
* database target. If we logged the queries in each connection object we
* database target. If we logged the queries in each connection object we
* would not be able to track what queries went to which target.
*
* Every connection has one and only one logging object on it for all targets
......@@ -20,7 +20,7 @@
class DatabaseLog {
/**
* Cache of logged queries. This will only be used if the query logger is enabled.
* Cache of logged queries. This will only be used if the query logger is enabled.
*
* The structure for the logging array is as follows:
*
......@@ -58,7 +58,7 @@ public function __construct($key = 'default') {
* If the specified logging key is already running this method does nothing.
*
* @param $logging_key
* The identification key for this log request. By specifying different
* The identification key for this log request. By specifying different
* logging keys we are able to start and stop multiple logging runs
* simultaneously without them colliding.
*/
......@@ -83,7 +83,7 @@ public function get($logging_key) {
/**
* Empty the query log for the specified logging key.
*
* This method does not stop logging, it simply clears the log. To stop
* This method does not stop logging, it simply clears the log. To stop
* logging, use the end() method.
*
* @param $logging_key
......@@ -129,14 +129,14 @@ public function log(DatabaseStatementInterface $statement, $args, $time) {
* Determine the routine that called this query.
*
* We define "the routine that called this query" as the first entry in
* the call stack that is not inside includes/database. That makes the
* the call stack that is not inside includes/database. That makes the
* climbing logic very simple, and handles the variable stack depth caused
* by the query builders.
*
* @link http://www.php.net/debug_backtrace
* @return
* This method returns a stack trace entry similar to that generated by
* debug_backtrace(). However, it flattens the trace entry and the trace
* debug_backtrace(). However, it flattens the trace entry and the trace
* entry before it so that we get the function and args of the function that
* called into the database system, not the function and args of the
* database call itself.
......
......@@ -66,7 +66,7 @@ public function __toString() {
}
}
else {
// If there are no values, then this is a default-only query. We still need to handle that.
// If there are no values, then this is a default-only query. We still need to handle that.
$placeholders = array_fill(0, count($this->defaultFields), 'default');
$values[] = '(' . implode(', ', $placeholders) .')';
}
......@@ -95,7 +95,7 @@ public function execute() {
$max_placeholder = 0;
$values = array();
// We assume that the order here is the same as in __toString(). If that's
// We assume that the order here is the same as in __toString(). If that's
// not the case, then we have serious problems.
foreach ($insert_fields as $value) {
$values[':db_insert_placeholder_' . $max_placeholder++] = $value;
......
......@@ -136,7 +136,7 @@ protected function processField($field) {
}
public function getFieldTypeMap() {
// Put :normal last so it gets preserved by array_flip. This makes
// Put :normal last so it gets preserved by array_flip. This makes
// it much easier for modules (such as schema.module) to map
// database types back into schema types.
static $map = array(
......
......@@ -91,7 +91,7 @@ public function databaseType() {
public function mapConditionOperator($operator) {
static $specials = array(
// In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
// In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
// statements, we need to use ILIKE instead.
'LIKE' => array('operator' => 'ILIKE'),
);
......
......@@ -96,7 +96,7 @@ public function __toString() {
}
}
else {
// If there are no values, then this is a default-only query. We still need to handle that.
// If there are no values, then this is a default-only query. We still need to handle that.
$placeholders = array_fill(0, count($this->defaultFields), 'default');
$values[] = '(' . implode(', ', $placeholders) .')';
}
......
......@@ -137,7 +137,7 @@ protected function processField($field) {
* to the engine-specific data type.
*/
function getFieldTypeMap() {
// Put :normal last so it gets preserved by array_flip. This makes
// Put :normal last so it gets preserved by array_flip. This makes
// it much easier for modules (such as schema.module) to map
// database types back into schema types.
$map = array(
......@@ -235,7 +235,7 @@ public function dropTable(&$ret, $table) {
* @param $keys_new
* Optional keys and indexes specification to be created on the
* table along with adding the field. The format is the same as a
* table specification but without the 'fields' element. If you are
* table specification but without the 'fields' element. If you are
* adding a type 'serial' field, you MUST specify at least one key
* or index including it in this array. @see db_change_field for more
* explanation why.
......@@ -424,7 +424,7 @@ public function dropIndex(&$ret, $table, $name) {
* );
* @endcode
* and you want to change foo.bar to be type serial, leaving it as the
* primary key. The correct sequence is:
* primary key. The correct sequence is:
* @code
* db_drop_primary_key($ret, 'foo');
* db_change_field($ret, 'foo', 'bar', 'bar',
......@@ -439,10 +439,10 @@ public function dropIndex(&$ret, $table, $name) {
* sequences (from serial-type fields) that use the changed field to be dropped.
*
* On MySQL, all type 'serial' fields must be part of at least one key
* or index as soon as they are created. You cannot use
* or index as soon as they are created. You cannot use
* db_add_{primary_key,unique_key,index}() for this purpose because
* the ALTER TABLE command will fail to add the column without a key
* or index specification. The solution is to use the optional
* or index specification. The solution is to use the optional
* $new_keys argument to create the key or index at the same time as
* field.
*
......
This diff is collapsed.
......@@ -27,25 +27,25 @@
*
* - 'description': A string describing this table and its purpose.
* References to other tables should be enclosed in
* curly-brackets. For example, the node_revisions table
* curly-brackets. For example, the node_revisions table
* description field might contain "Stores per-revision title and
* body data for each {node}."
* - 'fields': An associative array ('fieldname' => specification)
* that describes the table's database columns. The specification
* is also an array. The following specification parameters are defined:
* that describes the table's database columns. The specification
* is also an array. The following specification parameters are defined:
*
* - 'description': A string describing this field and its purpose.
* References to other tables should be enclosed in
* curly-brackets. For example, the node table vid field
* curly-brackets. For example, the node table vid field
* description might contain "Always holds the largest (most
* recent) {node_revision}.vid value for this nid."
* - 'type': The generic datatype: 'varchar', 'int', 'serial'
* 'float', 'numeric', 'text', 'blob' or 'datetime'. Most types
* 'float', 'numeric', 'text', 'blob' or 'datetime'. Most types
* just map to the according database engine specific
* datatypes. Use 'serial' for auto incrementing fields. This
* datatypes. Use 'serial' for auto incrementing fields. This
* will expand to 'int auto_increment' on mysql.
* - 'size': The data size: 'tiny', 'small', 'medium', 'normal',
* 'big'. This is a hint about the largest value the field will
* 'big'. This is a hint about the largest value the field will
* store and determines which of the database engine specific
* datatypes will be used (e.g. on MySQL, TINYINT vs. INT vs. BIGINT).
* 'normal', the default, selects the base type (e.g. on MySQL,
......@@ -54,21 +54,21 @@
* Not all sizes are available for all data types. See
* db_type_map() for possible combinations.
* - 'not null': If true, no NULL values will be allowed in this
* database column. Defaults to false.
* - 'default': The field's default value. The PHP type of the
* value matters: '', '0', and 0 are all different. If you
* database column. Defaults to false.
* - 'default': The field's default value. The PHP type of the
* value matters: '', '0', and 0 are all different. If you
* specify '0' as the default value for a type 'int' field it
* will not work because '0' is a string containing the
* character "zero", not an integer.
* - 'length': The maximal length of a type 'varchar' or 'text'
* field. Ignored for other field types.
* field. Ignored for other field types.
* - 'unsigned': A boolean indicating whether a type 'int', 'float'
* and 'numeric' only is signed or unsigned. Defaults to
* FALSE. Ignored for other field types.
* and 'numeric' only is signed or unsigned. Defaults to
* FALSE. Ignored for other field types.
* - 'precision', 'scale': For type 'numeric' fields, indicates
* the precision (total number of significant digits) and scale
* (decimal digits right of the decimal point). Both values are
* mandatory. Ignored for other field types.
* (decimal digits right of the decimal point). Both values are
* mandatory. Ignored for other field types.
*
* All parameters apart from 'type' are optional except that type
* 'numeric' columns must specify 'precision' and 'scale'.
......@@ -76,10 +76,10 @@
* - 'primary key': An array of one or more key column specifiers (see below)
* that form the primary key.
* - 'unique key': An associative array of unique keys ('keyname' =>
* specification). Each specification is an array of one or more
* specification). Each specification is an array of one or more
* key column specifiers (see below) that form a unique key on the table.
* - 'indexes': An associative array of indexes ('indexame' =>
* specification). Each specification is an array of one or more
* specification). Each specification is an array of one or more
* key column specifiers (see below) that form an index on the
* table.
*
......@@ -88,7 +88,7 @@
* of the named column.
*
* As an example, here is a SUBSET of the schema definition for
* Drupal's 'node' table. It show four fields (nid, vid, type, and
* Drupal's 'node' table. It show four fields (nid, vid, type, and
* title), the primary key on field 'nid', a unique key named 'vid' on
* field 'vid', and two indexes, one named 'nid' on field 'nid' and
* one named 'node_title_type' on the field 'title' and the first four
......@@ -180,7 +180,7 @@ public function __construct($connection) {
* @param $keys_new
* Optional keys and indexes specification to be created on the
* table along with adding the field. The format is the same as a
* table specification but without the 'fields' element. If you are
* table specification but without the 'fields' element. If you are
* adding a type 'serial' field, you MUST specify at least one key
* or index including it in this array. @see db_change_field for more
* explanation why.
......@@ -321,7 +321,7 @@ public function __construct($connection) {
* );
* @endcode
* and you want to change foo.bar to be type serial, leaving it as the
* primary key. The correct sequence is:
* primary key. The correct sequence is:
* @code
* db_drop_primary_key($ret, 'foo');
* db_change_field($ret, 'foo', 'bar', 'bar',
......@@ -336,10 +336,10 @@ public function __construct($connection) {
* sequences (from serial-type fields) that use the changed field to be dropped.
*
* On MySQL, all type 'serial' fields must be part of at least one key
* or index as soon as they are created. You cannot use
* or index as soon as they are created. You cannot use
* db_add_{primary_key,unique_key,index}() for this purpose because
* the ALTER TABLE command will fail to add the column without a key
* or index specification. The solution is to use the optional
* or index specification. The solution is to use the optional
* $keys_new argument to create the key or index at the same time as
* field.
*
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
*
* Image toolkits are discovered based on the associated module's
* hook_image_toolkits. Additionally the image toolkit include file
* must be identified in the files array in the module.info file. The
* must be identified in the files array in the module.info file. The
* toolkit must then be enabled using the admin/settings/image-toolkit
* form.
*
......@@ -139,7 +139,7 @@ function image_get_info($file) {
/**
* Scales an image to the exact width and height given. Achieves the
* target aspect ratio by cropping the original image equally on both
* sides, or equally on the top and bottom. This function is, for
* sides, or equally on the top and bottom. This function is, for
* example, useful to create uniform sized avatars from larger images.
*
* The resulting image always has the exact target dimensions.
......
......@@ -207,7 +207,7 @@ function drupal_detect_database_types() {
$databases = array();
// We define a driver as a directory in /includes/database that in turn
// contains a database.inc file. That allows us to drop in additional drivers
// contains a database.inc file. That allows us to drop in additional drivers
// without modifying the installer.
// Because we have no registry yet, we need to also include the install.inc
// file for the driver explicitly.
......
......@@ -239,9 +239,9 @@
* part of the path. If the bit is 1, then it represents the original
* value while 0 means wildcard. If the path is node/12/edit/foo
* then the 1011 bitstring represents node/%/edit/foo where % means that
* any argument matches that part. We limit ourselves to using binary
* any argument matches that part. We limit ourselves to using binary
* numbers that correspond the patterns of wildcards of router items that
* actually exists. This list of 'masks' is built in menu_rebuild().
* actually exists. This list of 'masks' is built in menu_rebuild().
*
* @param $parts
* An array of path parts, for the above example
......@@ -822,7 +822,7 @@ function menu_tree_output($tree) {
* @param $menu_name
* The named menu links to return
* @param $item
* A fully loaded menu link, or NULL. If a link is supplied, only the
* A fully loaded menu link, or NULL. If a link is supplied, only the
* path to root will be included in the returned tree- as if this link
* represented the current page in a visible menu.
* @return
......@@ -887,7 +887,7 @@ function menu_tree_all_data($menu_name = 'navigation', $item = NULL) {
// Get all links in this menu.
$parents = array();
}
// Select the links from the table, and recursively build the tree. We
// Select the links from the table, and recursively build the tree. We
// LEFT JOIN since there is no match in {menu_router} for an external
// link.
$data['tree'] = menu_tree_data($query->execute(), $parents);
......@@ -1621,7 +1621,7 @@ function menu_set_active_trail($new_trail = NULL) {
if ($item['tab_parent']) {
// The title of a local task is used for the tab, never the page title.
// Thus, replace it with the item corresponding to the root path to get
// the relevant href and title. For example, the menu item corresponding
// the relevant href and title. For example, the menu item corresponding
// to 'admin' is used when on the 'By module' tab at 'admin/by-module'.
$parts = explode('/', $item['tab_root']);
$args = arg();
......@@ -1759,7 +1759,7 @@ function menu_cache_clear($menu_name = 'navigation') {
}
/**
* Clears all cached menu data. This should be called any time broad changes
* Clears all cached menu data. This should be called any time broad changes
* might have been made to the router items or menu links.
*/
function menu_cache_clear_all() {
......
......@@ -392,7 +392,7 @@ function module_hook($module, $hook) {
* MODULE_IMPLEMENTS_WRITE_CACHE: Write the stored list of hook
* implementations into the cache_registry table.
* @param $sort
* By default, modules are ordered by weight and filename. By setting this
* By default, modules are ordered by weight and filename. By setting this
* option to TRUE, modules will be ordered by module name.
* @return
* An array with the names of the modules which are implementing this hook.
......
......@@ -218,7 +218,7 @@ function user_check_password($password, $account) {
* Check whether a user's hashed password needs to be replaced with a new hash.
*
* This is typically called during the login process when the plain text
* password is available. A new hash is needed when the desired iteration count
* password is available. A new hash is needed when the desired iteration count
* has changed through a change in the variable password_count_log2 or
* DRUPAL_HASH_COUNT or if the user's password hash was generated in an update
* like user_update_7000().
......
......@@ -25,10 +25,10 @@
function _registry_rebuild() {
// The registry serves as a central autoloader for all classes, including
// the database query builders. However, the registry rebuild process
// the database query builders. However, the registry rebuild process
// requires write ability to the database, which means having access to the
// query builders that require the registry in order to be loaded. That
// causes a fatal race condition. Therefore we manually include the
// query builders that require the registry in order to be loaded. That
// causes a fatal race condition. Therefore we manually include the
// appropriate query builders for the currently active database before the
// registry rebuild process runs.
$connection_info = Database::getConnectionInfo();
......@@ -173,7 +173,7 @@ function _registry_parse_file($filename, $contents, $module = '', $weight = 0) {
);
// Because some systems, such as cache, currently use duplicate function
// names in separate files an insert query cannot be used here as it
// would cause a key constraint violation. Instead we use a merge query.
// would cause a key constraint violation. Instead we use a merge query.
// In practice this should not be an issue as those systems all initialize
// pre-registry and therefore are never loaded by the registry so it
// doesn't matter if those records in the registry table point to one
......
......@@ -26,7 +26,7 @@
*/
function install_main() {
// The user agent header is used to pass a database prefix in the request when
// running tests. However, for security reasons, it is imperative that no
// running tests. However, for security reasons, it is imperative that no
// installation be permitted using such a prefix.
if (preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) {
header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
......@@ -69,7 +69,7 @@ function install_main() {
require_once DRUPAL_ROOT . '/includes/cache.inc';
$conf['cache_inc'] = 'includes/cache.inc';
// Initialize the database system. Note that the connection
// Initialize the database system. Note that the connection
// won't be initialized until it is actually requested.
require_once DRUPAL_ROOT . '/includes/database/database.inc';
......@@ -741,7 +741,7 @@ function install_tasks($profile, $task) {
// Build menu to allow clean URL check.
menu_rebuild();
// Cache a fully-built schema. This is necessary for any
// Cache a fully-built schema. This is necessary for any
// invocation of index.php because: (1) setting cache table
// entries requires schema information, (2) that occurs during
// bootstrap before any module are loaded, so (3) if there is no
......
......@@ -9,7 +9,7 @@ Drupal.behaviors.textarea = {
}
var textarea = $(this).addClass('textarea-processed'), staticOffset = null;
// When wrapping the text area, work around an IE margin bug. See:
// When wrapping the text area, work around an IE margin bug. See:
// http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout
$(this).wrap('<div class="resizable-textarea"><span></span></div>')
.parent().append($('<div class="grippie"></div>').mousedown(startDrag));
......
......@@ -47,7 +47,7 @@ function _book_install_type_create() {
* Drupal 5.x to 6.x update.
*
* This function moves any existing book hierarchy into the new structure used
* in the 6.x module. Rather than storing the hierarchy in the {book} table,
* in the 6.x module. Rather than storing the hierarchy in the {book} table,
* the menu API is used to store the hierarchy in the {menu_links} table and the
* {book} table serves to uniquely connect a node to a menu link.
*
......
......@@ -575,7 +575,7 @@ function book_update_bid($book_link) {
* @return
* A linear array of menu links in the order that the links are shown in the
* menu, so the previous and next pages are the elements before and after the
* element corresponding to $node. The children of $node (if any) will come
* element corresponding to $node. The children of $node (if any) will come
* immediately after it in the array.
*/
function book_get_flat_menu($book_link) {
......@@ -963,7 +963,7 @@ function _book_toc_recurse($tree, $indent, &$toc, $exclude, $depth_limit) {
* @param $bid
* The ID of the book whose pages are to be listed.
* @param $exclude
* Optional array of mlid values. Any link whose mlid is in this array
* Optional array of mlid values. Any link whose mlid is in this array
* will be excluded (along with its children).
* @param $depth_limit
* Any link deeper than this value will be excluded (along with its children).
......
......@@ -221,7 +221,7 @@ function book_remove_form_submit($form, &$form_state) {
/**
* AJAX callback to replace the book parent select options.
*
* This function is called when the selected book is changed. It updates the
* This function is called when the selected book is changed. It updates the
* cached form (either the node form or the book outline form) and returns
* rendered output to be used to replace the select containing the possible
* parent pages in the newly selected book.
......
......@@ -1508,7 +1508,7 @@ function comment_form(&$form_state, $edit, $title = NULL) {
);
// Only show the save button if comment previews are optional or if we are
// already previewing the submission. However, if there are form errors,
// already previewing the submission. However, if there are form errors,
// we hide the save button no matter what, so that optional form elements
// (e.g., captchas) can be updated.
if (!form_get_errors() && ((variable_get('comment_preview_' . $node->type, COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview')) || ($op == t('Save')))) {
......
......@@ -92,7 +92,7 @@
* @param $text
* The content to filter (applies to 'prepare' and 'process').
* @param $langcode
* The language code associated with the content, e.g. 'en' for English. This
* The language code associated with the content, e.g. 'en' for English. This
* enables filters to be language aware and can be used to implement language
* specific text replacements.
* @param $cache_id
......
......@@ -412,7 +412,7 @@ function filter_list_format($format) {
* the default format.
* @param $langcode
* Optional: the language code of the text to be filtered, e.g. 'en' for
* English. This allows filters to be language aware so language specific
* English. This allows filters to be language aware so language specific
* text replacement can be implemented.
* @param $check
* Whether to check the $format with filter_access() first. Defaults to TRUE.
......
......@@ -42,7 +42,7 @@ function filter_tips_long() {
* @param $long
* (optional) Whether the passed in filter tips contain extended explanations,
* i.e. intended to be output on the path 'filter/tips' (TRUE), or are in a
* short format, i.e. suitable to be displayed below a form element. Defaults
* short format, i.e. suitable to be displayed below a form element. Defaults
* to FALSE.
*
* @see _filter_tips()
......
......@@ -103,7 +103,7 @@ function forum_schema() {
/**
* Create the forum vocabulary if does not exist. Assign the
* vocabulary a low weight so it will appear first in forum topic
* create and edit forms. Do not just call forum_enable() because in
* create and edit forms. Do not just call forum_enable() because in
* future versions it might do something different.
*/
function forum_update_6000() {
......
......@@ -165,7 +165,7 @@ function forum_init() {
*/
function _forum_nodeapi_check_node_type($node, $vocabulary) {
// We are going to return if $node->type is not one of the node
// types assigned to the forum vocabulary. If forum_nav_vocabulary
// types assigned to the forum vocabulary. If forum_nav_vocabulary
// is undefined or the vocabulary does not exist, it clearly cannot
// be assigned to $node->type, so return to avoid E_ALL warnings.
if (empty($vocabulary)) {
......
......@@ -34,11 +34,11 @@
* An array that corresponds to the return of the arg() function - if a module
* needs to provide help for a page with additional parameters after the
* Drupal path or help for a specific value for a wildcard in the path, then
* the values in this array can be referenced. For example you could provide
* help for user/1 by looking for the path user/% and $arg[1] == '1'. This
* the values in this array can be referenced. For example you could provide
* help for user/1 by looking for the path user/% and $arg[1] == '1'. This
* array should always be used rather than directly invoking arg(). Note that
* depending on which module is invoking hook_help, $arg may contain only,
* empty strings. Regardless, $arg[0] to $arg[11] will always be set.
* empty strings. Regardless, $arg[0] to $arg[11] will always be set.
* @return
* A localized string containing the help text. Every web link, l(), or
* url() must be replaced with %something and put into the final t()
......
......@@ -117,7 +117,7 @@ function locale_update_6000() {
/**
* Change locale column to language. The language column is added by
* update_fix_d6_requirements() in update.php to avoid a large number
* of error messages from update.php. All we need to do here is copy
* of error messages from update.php. All we need to do here is copy
* locale to language and then drop locale.
*/
function locale_update_6001() {
......
......@@ -5,7 +5,7 @@ class LocaleTestCase extends DrupalWebTestCase {
function getInfo() {
return array(
'name' => t('String translate and validate'),
'description' => 'Adds a new locale and translates its name. Checks the validation of translation strings.',
'description' => 'Adds a new locale and translates its name. Checks the validation of translation strings.',
'group' => 'Locale',
);
}
......
......@@ -32,7 +32,7 @@
* visits the path. If omitted, the parent menu item's callback will be used
* instead.
* - "page arguments": An array of arguments to pass to the page callback
* function. Integer values pass the corresponding URL component (see arg()).
* function. Integer values pass the corresponding URL component (see arg()).
* - "access callback": A function returning a boolean value that determines
* whether the user has access rights to this menu item. Defaults to
* user_access() unless a value is inherited from a parent menu item..
......@@ -85,8 +85,8 @@ function hook_menu() {
* Alter the data being saved to the {menu_router} table after hook_menu is invoked.
*
* This hook is invoked by menu_router_build(). The menu definitions are passed
* in by reference. Each element of the $callbacks array is one item returned
* by a module from hook_menu. Additional items may be added, or existing items
* in by reference. Each element of the $callbacks array is one item returned
* by a module from hook_menu. Additional items may be added, or existing items
* altered.
*
* @param $callbacks
......@@ -125,7 +125,7 @@ function hook_menu_link_alter(&$item, $menu) {
*
* This hook may be used, for example, to add a page-specific query string.
* For performance reasons, only links that have $item['options']['alter'] == TRUE
* will be passed into this hook. The $item['options']['alter'] flag should
* will be passed into this hook. The $item['options']['alter'] flag should
* generally be set using hook_menu_link_alter().
*
* @param $item
......
......@@ -54,7 +54,7 @@ function theme_node_admin_overview($name, $type) {
function node_type_form(&$form_state, $type = NULL) {
drupal_add_js(drupal_get_path('module', 'node') .'/content_types.js');
if (!isset($type->type)) {
// This is a new type. Node module managed types are custom and unlocked.
// This is a new type. Node module managed types are custom and unlocked.
$type = node_type_set_defaults(array('custom' => 1, 'locked' => 0));
}
......
......@@ -561,7 +561,7 @@ function node_admin_nodes_submit($form, &$form_state) {
cache_clear_all();
}
else {
// We need to rebuild the form to go to a second step. For example, to
// We need to rebuild the form to go to a second step. For example, to
// show the confirmation form for the deletion of nodes.
$form_state['rebuild'] = TRUE;
}
......
......@@ -739,8 +739,8 @@ function hook_update($node) {
* this module), use hook_nodeapi() instead.
*
* Changes made to the $node object within a hook_validate() function will
* have no effect. The preferred method to change a node's content is to use
* hook_submit() or hook_nodeapi($op='submit') instead. If it is really
* have no effect. The preferred method to change a node's content is to use
* hook_submit() or hook_nodeapi($op='submit') instead. If it is really
* necessary to change the node at the validate stage, you can use function
* form_set_value().
*
......
......@@ -382,7 +382,7 @@ function node_teaser($body, $format = NULL, $size = NULL) {
// Initialize it to maximum in order to find the minimum.
$min_rpos = $max_rpos;
// Store the reverse of the teaser. We use strpos on the reversed needle and
// Store the reverse of the teaser. We use strpos on the reversed needle and
// haystack for speed and convenience.
$reversed = strrev($teaser);
......@@ -417,7 +417,7 @@ function node_teaser($body, $format = NULL, $size = NULL) {
// If a break point was found in this group, slice and return the teaser.
if ($min_rpos !== $max_rpos) {
// Don't slice with length 0. Length must be <0 to slice from RHS.