summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/bootstrap.inc2
-rw-r--r--includes/common.inc2
-rw-r--r--includes/path.inc2
-rw-r--r--modules/blogapi/blogapi.module2
-rw-r--r--modules/field/field.test18
-rw-r--r--modules/forum/forum.module2
-rw-r--r--modules/menu/menu.module2
-rw-r--r--modules/node/node.module20
-rw-r--r--modules/system/system.module16
9 files changed, 37 insertions, 29 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index aa658cfbc..90c2da466 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1182,7 +1182,7 @@ function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) {
}
}
- // messages not set when DB connection fails
+ // Messages not set when DB connection fails.
return isset($_SESSION['messages']) ? $_SESSION['messages'] : NULL;
}
diff --git a/includes/common.inc b/includes/common.inc
index 72b468560..099eaffb4 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1496,7 +1496,7 @@ function _filter_xss_attributes($attr) {
}
}
- // the attribute list ends with a valueless attribute like "selected"
+ // The attribute list ends with a valueless attribute like "selected".
if ($mode == 1) {
$attrarr[] = $attrname;
}
diff --git a/includes/path.inc b/includes/path.inc
index a6abc19b9..6ea9db901 100644
--- a/includes/path.inc
+++ b/includes/path.inc
@@ -255,7 +255,7 @@ function arg($index = NULL, $path = NULL) {
function drupal_get_title() {
$title = drupal_set_title();
- // during a bootstrap, menu.inc is not included and thus we cannot provide a title
+ // During a bootstrap, menu.inc is not included and thus we cannot provide a title.
if (!isset($title) && function_exists('menu_get_active_title')) {
$title = check_plain(menu_get_active_title());
}
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 6cf55dcd7..cf66d4a06 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -271,7 +271,7 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont
$original_status = $node->status;
$node->status = $publish;
- // check for bloggerAPI vs. metaWeblogAPI
+ // Check for bloggerAPI vs. metaWeblogAPI.
if (is_array($content)) {
$node->title = $content['title'];
$node->body = $content['description'];
diff --git a/modules/field/field.test b/modules/field/field.test
index 61f8009e4..429b8e77e 100644
--- a/modules/field/field.test
+++ b/modules/field/field.test
@@ -978,17 +978,19 @@ class FieldFormTestCase extends DrupalWebTestCase {
$field_values = array_values($field_values);
$this->assertIdentical($entity->{$this->field_name}, $field_values, 'Field values were saved in the correct order');
- // display edit form: check that the expected number of widgets is displayed, with correct values
- // change values, reorder, leave an empty value in the middle, submit: check that the entity is updated with correct values
- // re-submit: check that the field can be emptied.
+ // Display edit form: check that the expected number of widgets is
+ // displayed, with correct values change values, reorder, leave an empty
+ // value in the middle.
+ // Submit: check that the entity is updated with correct values
+ // Re-submit: check that the field can be emptied.
// Test with several multiple fields in a form
}
- // check with a multiple widget (implement a textfield with comma separated values)
+ // Check with a multiple widget (implement a textfield with comma separated values).
- // check inaccessible fields are preserved on update
- // check inaccessible fields get default value on insert (not implemented yet)
+ // Check inaccessible fields are preserved on update.
+ // Check inaccessible fields get default value on insert (not implemented yet).
function testFieldFormJSAddMore() {
$this->field = $this->field_unlimited;
@@ -1000,8 +1002,8 @@ class FieldFormTestCase extends DrupalWebTestCase {
// Display creation form -> 1 widget.
$this->drupalGet('test-entity/add/test-bundle');
- // Press 'add more' button a couple times -> 3 widgets
- // The drupalPostAhah() helper will not work iteratively, so we add those
+ // Press 'add more' button a couple times -> 3 widgets.
+ // The drupalPostAhah() helper will not work iteratively, so we add those.
// through non-'JS' submission.
$this->drupalPost(NULL, array(), t('Add another item'));
$this->drupalPost(NULL, array(), t('Add another item'));
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 1217657fa..80c46c4d0 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -953,7 +953,7 @@ function template_preprocess_forum_icon(&$variables) {
function template_preprocess_forum_topic_navigation(&$variables) {
$output = '';
- // get previous and next topic
+ // Get previous and next topic.
$sql = "SELECT n.nid, n.title, n.sticky, l.comment_count, l.last_comment_timestamp FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {taxonomy_term_node} r ON n.nid = r.nid AND r.tid = %d WHERE n.status = 1 ORDER BY n.sticky DESC, " . _forum_get_topic_order_sql(variable_get('forum_order', 1));
$result = db_query(db_rewrite_sql($sql), isset($variables['node']->tid) ? $variables['node']->tid : 0);
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index d45193089..1f1a61a5e 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -155,7 +155,7 @@ function menu_theme() {
/**
* Implementation of hook_enable().
*
- * Add a link for each custom menu.
+ * Add a link for each custom menu.
*/
function menu_enable() {
menu_rebuild();
diff --git a/modules/node/node.module b/modules/node/node.module
index 6129ed46f..3dd7eaa37 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2189,7 +2189,8 @@ function node_update_index() {
function _node_index_node($node) {
$node = node_load($node->nid);
- // save the changed time of the most recent indexed node, for the search results half-life calculation
+ // Save the changed time of the most recent indexed node, for the search
+ // results half-life calculation.
variable_set('node_cron_last', $node->changed);
// Build the node body.
@@ -2302,7 +2303,8 @@ function node_search_validate($form, &$form_state) {
// Insert extra restrictions into the search keywords string.
if (isset($form_state['values']['type']) && is_array($form_state['values']['type'])) {
- // Retrieve selected types - Forms API sets the value of unselected checkboxes to 0.
+ // Retrieve selected types - Forms API sets the value of unselected
+ // checkboxes to 0.
$form_state['values']['type'] = array_filter($form_state['values']['type']);
if (count($form_state['values']['type'])) {
$keys = search_query_insert($keys, 'type', implode(',', array_keys($form_state['values']['type'])));
@@ -2594,7 +2596,8 @@ function node_db_rewrite_sql($query, $primary_table, $primary_field) {
* Implementation of hook_query_TAG_alter().
*/
function node_query_node_access_alter(QueryAlterableInterface $query) {
- // Skip the extra expensive alterations if site has no node access control modules.
+ // Skip the extra expensive alterations if site has no node access control
+ // modules.
if (!node_access_view_all_nodes()) {
// Prevent duplicate records.
$query->distinct();
@@ -2607,7 +2610,8 @@ function node_query_node_access_alter(QueryAlterableInterface $query) {
// The node_access table has the access grants for any given node.
$access_alias = $query->join('node_access', 'na', 'na.nid = n.nid');
$or = db_or();
- // If any grant exists for the specified user, then user has access to the node for the specified operation.
+ // If any grant exists for the specified user, then user has access to the
+ // node for the specified operation.
foreach (node_access_grants($op, $query->getMetaData('account')) as $realm => $gids) {
foreach ($gids as $gid) {
$or->condition(db_and()
@@ -2644,7 +2648,7 @@ function node_access_acquire_grants($node) {
$grants[] = array('realm' => 'all', 'gid' => 0, 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0);
}
else {
- // retain grants by highest priority
+ // Retain grants by highest priority.
$grant_by_priority = array();
foreach ($grants as $g) {
$grant_by_priority[intval($g['priority'])][] = $g;
@@ -2918,7 +2922,8 @@ function node_content_form($node, $form_state) {
*/
/**
- * Implementation of hook_forms(). All node forms share the same form handler
+ * Implementation of hook_forms().
+ * All node forms share the same form handler.
*/
function node_forms() {
$forms = array();
@@ -3207,7 +3212,8 @@ function node_unpublish_by_keyword_action_submit($form, $form_state) {
* Unpublish a node if it contains a certain string.
*
* @param $context
- * An array providing more information about the context of the call to this action.
+ * An array providing more information about the context of the call to this
+ * action.
* @param $comment
* A node object.
*/
diff --git a/modules/system/system.module b/modules/system/system.module
index e5d895f1f..1f9f2452d 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -496,7 +496,7 @@ function system_menu() {
'access arguments' => array('access administration pages'),
);
- // menu items that are basically just menu blocks
+ // Menu items that are basically just menu blocks.
$items['admin/settings'] = array(
'title' => 'Site configuration',
'description' => 'Configure site settings.',
@@ -513,7 +513,7 @@ function system_menu() {
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array('access administration pages'),
);
- // Themes:
+ // Themes.
$items['admin/build/themes'] = array(
'title' => 'Themes',
'description' => 'Change which theme your site uses or allows users to set.',
@@ -533,7 +533,7 @@ function system_menu() {
'access arguments' => array('administer site configuration'),
'type' => MENU_LOCAL_TASK,
);
- // Theme configuration subtabs
+ // Theme configuration subtabs.
$items['admin/build/themes/settings/global'] = array(
'title' => 'Global settings',
'type' => MENU_DEFAULT_LOCAL_TASK,
@@ -550,7 +550,7 @@ function system_menu() {
);
}
- // Modules:
+ // Modules.
$items['admin/build/modules'] = array(
'title' => 'Modules',
'description' => 'Enable or disable add-on modules for your site.',
@@ -579,7 +579,7 @@ function system_menu() {
'type' => MENU_CALLBACK,
);
- // Actions:
+ // Actions.
$items['admin/settings/actions'] = array(
'title' => 'Actions',
'description' => 'Manage the actions defined for your site.',
@@ -637,7 +637,7 @@ function system_menu() {
'type' => MENU_CALLBACK,
);
- // Settings:
+ // Settings.
$items['admin/settings/site-information'] = array(
'title' => 'Site information',
'description' => 'Change basic site information, such as the site name, slogan, e-mail address, mission, front page and more.',
@@ -721,7 +721,7 @@ function system_menu() {
'type' => MENU_CALLBACK,
);
- // Reports:
+ // Reports.
$items['admin/reports'] = array(
'title' => 'Reports',
'description' => 'View reports from system logs and other status information.',
@@ -749,7 +749,7 @@ function system_menu() {
'access arguments' => array('administer site configuration'),
'type' => MENU_CALLBACK,
);
- // Default page for batch operations
+ // Default page for batch operations.
$items['batch'] = array(
'page callback' => 'system_batch_page',
'access callback' => TRUE,