? code-standards.path
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.374.2.5
diff -u -p -r1.374.2.5 aggregator.module
--- modules/aggregator/aggregator.module	30 Mar 2009 12:15:53 -0000	1.374.2.5
+++ modules/aggregator/aggregator.module	31 Oct 2009 08:24:22 -0000
@@ -310,7 +310,7 @@ function aggregator_block($op = 'list', 
         $block['feed-'. $feed->fid]['info'] = t('!title feed latest items', array('!title' => $feed->title));
       }
     }
-    else if ($op == 'configure') {
+    elseif ($op == 'configure') {
       list($type, $id) = explode('-', $delta);
       if ($type == 'category') {
         $value = db_result(db_query('SELECT block FROM {aggregator_category} WHERE cid = %d', $id));
@@ -321,7 +321,7 @@ function aggregator_block($op = 'list', 
       $form['block'] = array('#type' => 'select', '#title' => t('Number of news items in block'), '#default_value' => $value, '#options' => drupal_map_assoc(array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)));
       return $form;
     }
-    else if ($op == 'save') {
+    elseif ($op == 'save') {
       list($type, $id) = explode('-', $delta);
       if ($type == 'category') {
         $value = db_query('UPDATE {aggregator_category} SET block = %d WHERE cid = %d', $edit['block'], $id);
@@ -330,7 +330,7 @@ function aggregator_block($op = 'list', 
         $value = db_query('UPDATE {aggregator_feed} SET block = %d WHERE fid = %d', $edit['block'], $id);
       }
     }
-    else if ($op == 'view') {
+    elseif ($op == 'view') {
       list($type, $id) = explode('-', $delta);
       switch ($type) {
         case 'feed':
@@ -387,7 +387,7 @@ function aggregator_save_category($edit)
       $op = 'delete';
     }
   }
-  else if (!empty($edit['title'])) {
+  elseif (!empty($edit['title'])) {
     // A single unique id for bundles and feeds, to use in blocks
     db_query("INSERT INTO {aggregator_category} (title, description, block) VALUES ('%s', '%s', 5)", $edit['title'], $edit['description']);
     $link_path .= db_last_insert_id('aggregator_category', 'cid');
@@ -412,7 +412,7 @@ function aggregator_save_feed($edit) {
   if (!empty($edit['fid']) && !empty($edit['title'])) {
     db_query("UPDATE {aggregator_feed} SET title = '%s', url = '%s', refresh = %d WHERE fid = %d", $edit['title'], $edit['url'], $edit['refresh'], $edit['fid']);
   }
-  else if (!empty($edit['fid'])) {
+  elseif (!empty($edit['fid'])) {
     $items = array();
     $result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = %d', $edit['fid']);
     while ($item = db_fetch_object($result)) {
@@ -426,7 +426,7 @@ function aggregator_save_feed($edit) {
     // Make sure there is no active block for this feed.
     db_query("DELETE FROM {blocks} WHERE module = '%s' AND delta = '%s'", 'aggregator', 'feed-' . $edit['fid']);
   }
-  else if (!empty($edit['title'])) {
+  elseif (!empty($edit['title'])) {
     db_query("INSERT INTO {aggregator_feed} (title, url, refresh, block, description, image) VALUES ('%s', '%s', %d, 5, '', '')", $edit['title'], $edit['url'], $edit['refresh']);
     // A single unique id for bundles and feeds, to use in blocks.
     $edit['fid'] = db_last_insert_id('aggregator_feed', 'fid');
@@ -760,10 +760,10 @@ function aggregator_parse_feed(&$data, $
     if (!empty($item['CONTENT:ENCODED'])) {
       $item['DESCRIPTION'] = $item['CONTENT:ENCODED'];
     }
-    else if (!empty($item['SUMMARY'])) {
+    elseif (!empty($item['SUMMARY'])) {
       $item['DESCRIPTION'] = $item['SUMMARY'];
     }
-    else if (!empty($item['CONTENT'])) {
+    elseif (!empty($item['CONTENT'])) {
       $item['DESCRIPTION'] = $item['CONTENT'];
     }
 
@@ -791,7 +791,7 @@ function aggregator_parse_feed(&$data, $
     if (!empty($guid)) {
       $entry = db_fetch_object(db_query("SELECT iid FROM {aggregator_item} WHERE fid = %d AND guid = '%s'", $feed['fid'], $guid));
     }
-    else if ($link && $link != $feed['link'] && $link != $feed['url']) {
+    elseif ($link && $link != $feed['link'] && $link != $feed['url']) {
       $entry = db_fetch_object(db_query("SELECT iid FROM {aggregator_item} WHERE fid = %d AND link = '%s'", $feed['fid'], $link));
     }
     else {
@@ -829,11 +829,11 @@ function aggregator_save_item($edit) {
   if ($edit['iid'] && $edit['title']) {
     db_query("UPDATE {aggregator_item} SET title = '%s', link = '%s', author = '%s', description = '%s', guid = '%s', timestamp = %d WHERE iid = %d", $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['guid'], $edit['timestamp'], $edit['iid']);
   }
-  else if ($edit['iid']) {
+  elseif ($edit['iid']) {
     db_query('DELETE FROM {aggregator_item} WHERE iid = %d', $edit['iid']);
     db_query('DELETE FROM {aggregator_category_item} WHERE iid = %d', $edit['iid']);
   }
-  else if ($edit['title'] && $edit['link']) {
+  elseif ($edit['title'] && $edit['link']) {
     db_query("INSERT INTO {aggregator_item} (fid, title, link, author, description, timestamp, guid) VALUES (%d, '%s', '%s', '%s', '%s', %d, '%s')", $edit['fid'], $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['timestamp'], $edit['guid']);
     $edit['iid'] = db_last_insert_id('aggregator_item', 'iid');
     // file the items in the categories indicated by the feed
Index: modules/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.14.2.5
diff -u -p -r1.14.2.5 block.admin.inc
--- modules/block/block.admin.inc	24 Nov 2008 06:00:02 -0000	1.14.2.5
+++ modules/block/block.admin.inc	31 Oct 2009 08:24:22 -0000
@@ -265,7 +265,7 @@ function block_admin_configure(&$form_st
 
 function block_admin_configure_validate($form, &$form_state) {
   if ($form_state['values']['module'] == 'block') {
-    if (empty($form_state['values']['info']) || db_result(db_query("SELECT COUNT(*) FROM {boxes} WHERE bid != %d AND info = '%s'", $form_state['values']['delta'], $form_state['values']['info']))) {
+    if (empty($form_state['values']['info']) || db_result(db_query("SELECT COUNT(*) FROM {boxes} WHERE bid <> %d AND info = '%s'", $form_state['values']['delta'], $form_state['values']['info']))) {
       form_set_error('info', t('Please ensure that each block description is unique.'));
     }
   }
Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.299.2.3
diff -u -p -r1.299.2.3 block.module
--- modules/block/block.module	24 Jun 2008 14:40:08 -0000	1.299.2.3
+++ modules/block/block.module	31 Oct 2009 08:24:22 -0000
@@ -357,7 +357,7 @@ function block_user($type, $edit, &$acco
     case 'form':
       if ($category == 'account') {
         $rids = array_keys($account->roles);
-        $result = db_query("SELECT DISTINCT b.* FROM {blocks} b LEFT JOIN {blocks_roles} r ON b.module = r.module AND b.delta = r.delta WHERE b.status = 1 AND b.custom != 0 AND (r.rid IN (". db_placeholders($rids) .") OR r.rid IS NULL) ORDER BY b.weight, b.module", $rids);
+        $result = db_query("SELECT DISTINCT b.* FROM {blocks} b LEFT JOIN {blocks_roles} r ON b.module = r.module AND b.delta = r.delta WHERE b.status = 1 AND b.custom <> 0 AND (r.rid IN (". db_placeholders($rids) .") OR r.rid IS NULL) ORDER BY b.weight, b.module", $rids);
         $form['block'] = array('#type' => 'fieldset', '#title' => t('Block configuration'), '#weight' => 3, '#collapsible' => TRUE, '#tree' => TRUE);
         while ($block = db_fetch_object($result)) {
           $data = module_invoke($block->module, 'block', 'list');
Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.297.2.4
diff -u -p -r1.297.2.4 blog.module
--- modules/blog/blog.module	25 Feb 2009 12:21:53 -0000	1.297.2.4
+++ modules/blog/blog.module	31 Oct 2009 08:24:22 -0000
@@ -198,7 +198,7 @@ function blog_block($op = 'list', $delta
     $block[0]['info'] = t('Recent blog posts');
     return $block;
   }
-  else if ($op == 'view') {
+  elseif ($op == 'view') {
     if (user_access('access content')) {
       $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, 10);
       if ($node_title_list = node_title_list($result)) {
Index: modules/blog/blog.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.pages.inc,v
retrieving revision 1.6.2.3
diff -u -p -r1.6.2.3 blog.pages.inc
--- modules/blog/blog.pages.inc	14 Sep 2009 15:08:00 -0000	1.6.2.3
+++ modules/blog/blog.pages.inc	31 Oct 2009 08:24:23 -0000
@@ -19,7 +19,7 @@ function blog_page_user($account) {
   if (($account->uid == $user->uid) && user_access('create blog entries')) {
     $items[] = l(t('Post new blog entry.'), "node/add/blog");
   }
-  else if ($account->uid == $user->uid) {
+  elseif ($account->uid == $user->uid) {
     $items[] = t('You are not allowed to post a new blog entry.');
   }
 
Index: modules/blogapi/blogapi.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/Attic/blogapi.module,v
retrieving revision 1.115.2.5
diff -u -p -r1.115.2.5 blogapi.module
--- modules/blogapi/blogapi.module	8 Oct 2008 20:12:17 -0000	1.115.2.5
+++ modules/blogapi/blogapi.module	31 Oct 2009 08:24:23 -0000
@@ -749,7 +749,7 @@ function blogapi_admin_settings() {
     '#field_suffix' => t('MB')
   );
 
-  $form['settings_general']['upload_max_size'] = array('#value' => '<p>'. t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))).'</p>');
+  $form['settings_general']['upload_max_size'] = array('#value' => '<p>'. t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) .'</p>');
 
   $roles = user_roles(0, 'administer content with blog api');
   $form['roles'] = array('#type' => 'value', '#value' => $roles);
@@ -903,7 +903,7 @@ function _blogapi_get_post($node, $bodie
     if ($node->comment == 1) {
       $comment = 2;
     }
-    else if ($node->comment == 2) {
+    elseif ($node->comment == 2) {
       $comment = 1;
     }
     $xmlrpcval['content'] = "<title>$node->title</title>$node->body";
Index: modules/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.39.2.2
diff -u -p -r1.39.2.2 color.module
--- modules/color/color.module	16 May 2009 16:09:21 -0000	1.39.2.2
+++ modules/color/color.module	31 Oct 2009 08:24:24 -0000
@@ -131,7 +131,7 @@ function color_get_info($theme) {
 /**
  * Helper function to retrieve the color palette for a particular theme.
  */
-function color_get_palette($theme, $default = false) {
+function color_get_palette($theme, $default = FALSE) {
   // Fetch and expand default palette
   $fields = array('base', 'link', 'top', 'bottom', 'text');
   $info = color_get_info($theme);
@@ -159,7 +159,7 @@ function color_scheme_form(&$form_state,
   drupal_add_css($base .'/color.css', 'module', 'all', FALSE);
   drupal_add_js($base .'/color.js');
   drupal_add_js(array('color' => array(
-    'reference' => color_get_palette($theme, true)
+    'reference' => color_get_palette($theme, TRUE)
   )), 'setting');
 
   // See if we're using a predefined scheme
@@ -185,7 +185,7 @@ function color_scheme_form(&$form_state,
     'bottom' => t('Header bottom'),
     'text' => t('Text color')
   );
-  $form['palette']['#tree'] = true;
+  $form['palette']['#tree'] = TRUE;
   foreach ($palette as $name => $value) {
     $form['palette'][$name] = array(
       '#type' => 'textfield',
@@ -282,7 +282,7 @@ function color_scheme_form_submit($form,
   }
 
   // Don't render the default colorscheme, use the standard theme instead.
-  if (implode(',', color_get_palette($theme, true)) == implode(',', $palette)
+  if (implode(',', color_get_palette($theme, TRUE)) == implode(',', $palette)
     || $form_state['values']['op'] == t('Reset to defaults')) {
     variable_del('color_'. $theme .'_palette');
     variable_del('color_'. $theme .'_stylesheets');
@@ -375,7 +375,7 @@ function _color_rewrite_stylesheet($them
   foreach ($conversion as $k => $v) {
     $conversion[$k] = drupal_strtolower($v);
   }
-  $default = color_get_palette($theme, true);
+  $default = color_get_palette($theme, TRUE);
 
   // Split off the "Don't touch" section of the stylesheet.
   $split = "Color Module: Don't touch";
@@ -385,7 +385,7 @@ function _color_rewrite_stylesheet($them
 
   // Find all colors in the stylesheet and the chunks in between.
   $style = preg_split('/(#[0-9a-f]{6}|#[0-9a-f]{3})/i', $style, -1, PREG_SPLIT_DELIM_CAPTURE);
-  $is_color = false;
+  $is_color = FALSE;
   $output = '';
   $base = 'base';
 
@@ -410,7 +410,7 @@ function _color_rewrite_stylesheet($them
         $base = 'link';
       }
       // 'color:' styles. Use text.
-      else if (preg_match('/(?<!-)color[^{:]*:[^{#]*$/i', $chunk)) {
+      elseif (preg_match('/(?<!-)color[^{:]*:[^{#]*$/i', $chunk)) {
         $base = 'text';
       }
       // Reset back to base.
@@ -462,7 +462,7 @@ function _color_render_images($theme, &$
 
   // Prepare target buffer.
   $target = imagecreatetruecolor($width, $height);
-  imagealphablending($target, true);
+  imagealphablending($target, TRUE);
 
   // Fill regions of solid color.
   foreach ($info['fill'] as $color => $fill) {
@@ -532,9 +532,9 @@ function _color_shift($given, $ref1, $re
   // delta based on the length of the difference vectors:
 
   // delta = 1 - |ref2 - ref1| / |white - ref1|
-  $target = _color_unpack($target, true);
-  $ref1 = _color_unpack($ref1, true);
-  $ref2 = _color_unpack($ref2, true);
+  $target = _color_unpack($target, TRUE);
+  $ref1 = _color_unpack($ref1, TRUE);
+  $ref2 = _color_unpack($ref2, TRUE);
   $numerator = 0;
   $denominator = 0;
   for ($i = 0; $i < 3; ++$i) {
@@ -557,7 +557,7 @@ function _color_shift($given, $ref1, $re
   }
 
   // Take the given color, and blend it towards the target.
-  $given = _color_unpack($given, true);
+  $given = _color_unpack($given, TRUE);
   for ($i = 0; $i < 3; ++$i) {
     $result[$i] = $target[$i] + ($given[$i] - $target[$i]) * $delta;
   }
@@ -571,7 +571,7 @@ function _color_shift($given, $ref1, $re
   $result = _color_hsl2rgb($result);
 
   // Return hex color.
-  return _color_pack($result, true);
+  return _color_pack($result, TRUE);
 }
 
 /**
@@ -598,7 +598,7 @@ function _color_blend($img, $hex1, $hex2
 /**
  * Convert a hex color into an RGB triplet.
  */
-function _color_unpack($hex, $normalize = false) {
+function _color_unpack($hex, $normalize = FALSE) {
   if (strlen($hex) == 4) {
     $hex = $hex[1] . $hex[1] . $hex[2] . $hex[2] . $hex[3] . $hex[3];
   }
@@ -612,7 +612,7 @@ function _color_unpack($hex, $normalize 
 /**
  * Convert an RGB triplet to a hex color.
  */
-function _color_pack($rgb, $normalize = false) {
+function _color_pack($rgb, $normalize = FALSE) {
   $out = 0;
   foreach ($rgb as $k => $v) {
     $out |= (($v * ($normalize ? 255 : 1)) << (16 - $k * 8));
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.617.2.10
diff -u -p -r1.617.2.10 comment.module
--- modules/comment/comment.module	14 Sep 2009 10:36:42 -0000	1.617.2.10
+++ modules/comment/comment.module	31 Oct 2009 08:24:25 -0000
@@ -285,7 +285,7 @@ function comment_block($op = 'list', $de
     $blocks[0]['info'] = t('Recent comments');
     return $blocks;
   }
-  else if ($op == 'view' && user_access('access comments')) {
+  elseif ($op == 'view' && user_access('access comments')) {
     $block['subject'] = t('Recent comments');
     $block['content'] = theme('comment_block');
     return $block;
@@ -835,7 +835,7 @@ function comment_links($comment, $return
         'href' => "comment/reply/$comment->nid/$comment->cid"
       );
     }
-    else if (user_access('post comments')) {
+    elseif (user_access('post comments')) {
       if (comment_access('edit', $comment)) {
         $links['comment_edit'] = array(
           'title' => t('edit'),
@@ -974,7 +974,7 @@ function comment_render($node, $cid = 0)
           $query .= ' ORDER BY c.thread DESC';
         }
       }
-      else if ($order == COMMENT_ORDER_OLDEST_FIRST) {
+      elseif ($order == COMMENT_ORDER_OLDEST_FIRST) {
         if ($mode == COMMENT_MODE_FLAT_COLLAPSED || $mode == COMMENT_MODE_FLAT_EXPANDED) {
           $query .= ' ORDER BY c.cid';
         }
@@ -1016,13 +1016,13 @@ function comment_render($node, $cid = 0)
         if ($mode == COMMENT_MODE_FLAT_COLLAPSED) {
           $comments .= theme('comment_flat_collapsed', $comment, $node);
         }
-        else if ($mode == COMMENT_MODE_FLAT_EXPANDED) {
+        elseif ($mode == COMMENT_MODE_FLAT_EXPANDED) {
           $comments .= theme('comment_flat_expanded', $comment, $node);
         }
-        else if ($mode == COMMENT_MODE_THREADED_COLLAPSED) {
+        elseif ($mode == COMMENT_MODE_THREADED_COLLAPSED) {
           $comments .= theme('comment_thread_collapsed', $comment, $node);
         }
-        else if ($mode == COMMENT_MODE_THREADED_EXPANDED) {
+        elseif ($mode == COMMENT_MODE_THREADED_EXPANDED) {
           $comments .= theme('comment_thread_expanded', $comment, $node);
         }
 
@@ -1075,7 +1075,7 @@ function comment_operations($action = NU
       'delete' => array(t('Delete the selected comments'), '')
     );
   }
-  else if ($action == 'unpublish') {
+  elseif ($action == 'unpublish') {
     $operations = array(
       'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'),
       'delete' => array(t('Delete the selected comments'), '')
@@ -1209,7 +1209,7 @@ function comment_validate($edit) {
         }
 
       }
-      else if (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MUST_CONTACT) {
+      elseif (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MUST_CONTACT) {
         form_set_error('name', t('You have to leave your name.'));
       }
 
@@ -1218,7 +1218,7 @@ function comment_validate($edit) {
           form_set_error('mail', t('The e-mail address you specified is not valid.'));
         }
       }
-      else if (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MUST_CONTACT) {
+      elseif (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MUST_CONTACT) {
         form_set_error('mail', t('You have to leave an e-mail address.'));
       }
 
@@ -1341,7 +1341,7 @@ function comment_form(&$form_state, $edi
       $form['author'] = array('#type' => 'value', '#value' => $user->name);
     }
   }
-  else if (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MAY_CONTACT) {
+  elseif (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MAY_CONTACT) {
     $form['name'] = array('#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 60, '#size' => 30, '#default_value' => $edit['name'] ? $edit['name'] : variable_get('anonymous', t('Anonymous'))
     );
 
@@ -1350,7 +1350,7 @@ function comment_form(&$form_state, $edi
 
     $form['homepage'] = array('#type' => 'textfield', '#title' => t('Homepage'), '#maxlength' => 255, '#size' => 30, '#default_value' => $edit['homepage']);
   }
-  else if (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MUST_CONTACT) {
+  elseif (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MUST_CONTACT) {
     $form['name'] = array('#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 60, '#size' => 30, '#default_value' => $edit['name'] ? $edit['name'] : variable_get('anonymous', t('Anonymous')), '#required' => TRUE);
 
     $form['mail'] = array('#type' => 'textfield', '#title' => t('E-mail'), '#maxlength' => 64, '#size' => 30, '#default_value' => $edit['mail'], '#description' => t('The content of this field is kept private and will not be shown publicly.'), '#required' => TRUE);
@@ -1908,7 +1908,7 @@ function _comment_get_display_setting($s
       if (isset($user->$setting) && $user->$setting) {
         $value = $user->$setting;
       }
-      else if (isset($_SESSION['comment_'. $setting]) && $_SESSION['comment_'. $setting]) {
+      elseif (isset($_SESSION['comment_'. $setting]) && $_SESSION['comment_'. $setting]) {
         $value = $_SESSION['comment_'. $setting];
       }
       else {
@@ -1963,7 +1963,7 @@ function comment_invoke_comment(&$commen
     if (isset($result) && is_array($result)) {
       $return = array_merge($return, $result);
     }
-    else if (isset($result)) {
+    elseif (isset($result)) {
       $return[] = $result;
     }
   }
Index: modules/comment/comment.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.pages.inc,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 comment.pages.inc
--- modules/comment/comment.pages.inc	1 Jul 2009 20:51:55 -0000	1.2.2.2
+++ modules/comment/comment.pages.inc	31 Oct 2009 08:24:25 -0000
@@ -89,7 +89,7 @@ function comment_reply($node, $pid = NUL
         }
       }
       // This is the case where the comment is in response to a node. Display the node.
-      else if (user_access('access content')) {
+      elseif (user_access('access content')) {
         $output .= node_view($node);
       }
 
@@ -98,7 +98,7 @@ function comment_reply($node, $pid = NUL
         drupal_set_message(t("This discussion is closed: you can't post new comments."), 'error');
         drupal_goto("node/$node->nid");
       }
-      else if (user_access('post comments')) {
+      elseif (user_access('post comments')) {
         $output .= comment_form_box(array('pid' => $pid, 'nid' => $node->nid), t('Reply'));
       }
       else {
Index: modules/contact/contact.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v
retrieving revision 1.6.2.2
diff -u -p -r1.6.2.2 contact.pages.inc
--- modules/contact/contact.pages.inc	27 Apr 2009 14:48:21 -0000	1.6.2.2
+++ modules/contact/contact.pages.inc	31 Oct 2009 08:24:25 -0000
@@ -160,7 +160,7 @@ function contact_user_page($account) {
   if (!valid_email_address($user->mail)) {
     $output = t('You need to provide a valid e-mail address to contact other users. Please update your <a href="@url">user information</a> and try again.', array('@url' => url("user/$user->uid/edit")));
   }
-  else if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3))) {
+  elseif (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3))) {
     $output = t('You cannot contact more than %number users per hour. Please try again later.', array('%number' => variable_get('contact_hourly_threshold', 3)));
   }
   else {
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.204.2.9
diff -u -p -r1.204.2.9 filter.module
--- modules/filter/filter.module	10 Aug 2009 11:04:37 -0000	1.204.2.9
+++ modules/filter/filter.module	31 Oct 2009 08:24:26 -0000
@@ -781,7 +781,7 @@ function _filter_htmlcorrector($text) {
   // Note: PHP ensures the array consists of alternating delimiters and literals
   // and begins and ends with a literal (inserting $null as required).
 
-  $tag = false; // Odd/even counter. Tag or no tag.
+  $tag = FALSE; // Odd/even counter. Tag or no tag.
   $stack = array();
   $output = '';
   foreach ($split as $value) {
@@ -900,12 +900,12 @@ function _filter_autop($text) {
         }
       }
       // Only allow a matching tag to close it.
-      else if (!$open && $ignoretag == $tag) {
+      elseif (!$open && $ignoretag == $tag) {
         $ignore = FALSE;
         $ignoretag = '';
       }
     }
-    else if (!$ignore) {
+    elseif (!$ignore) {
       $chunk = preg_replace('|\n*$|', '', $chunk) ."\n\n"; // just to make things a little easier, pad the end
       $chunk = preg_replace('|<br />\s*<br />|', "\n\n", $chunk);
       $chunk = preg_replace('!(<'. $block .'[^>]*>)!', "\n$1", $chunk); // Space things out a little
@@ -1021,7 +1021,7 @@ function _filter_xss_split($m, $store = 
     // We matched a lone ">" character
     return '&gt;';
   }
-  else if (strlen($string) == 1) {
+  elseif (strlen($string) == 1) {
     // We matched a lone "<" character
     return '&lt;';
   }
Index: modules/forum/forum.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.admin.inc,v
retrieving revision 1.8.2.1
diff -u -p -r1.8.2.1 forum.admin.inc
--- modules/forum/forum.admin.inc	26 May 2009 08:13:00 -0000	1.8.2.1
+++ modules/forum/forum.admin.inc	31 Oct 2009 08:24:26 -0000
@@ -284,7 +284,7 @@ function _forum_parent_select($tid, $tit
   if ($child_type == 'container') {
     $description = t('Containers are usually placed at the top (root) level, but may also be placed inside another container or forum.');
   }
-  else if ($child_type == 'forum') {
+  elseif ($child_type == 'forum') {
     $description = t('Forums may be placed at the top (root) level, or inside another container or forum.');
   }
 
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.212.2.6
diff -u -p -r1.212.2.6 locale.module
--- modules/locale/locale.module	25 Feb 2009 11:47:37 -0000	1.212.2.6
+++ modules/locale/locale.module	31 Oct 2009 08:24:27 -0000
@@ -534,7 +534,7 @@ function locale_update_js_files() {
   }
   // If no refresh was attempted, but we have new source files, we need
   // to store them too. This occurs if current page is in English.
-  else if ($new_files) {
+  elseif ($new_files) {
     variable_set('javascript_parsed', $parsed);
   }
 
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.157.2.6
diff -u -p -r1.157.2.6 menu.module
--- modules/menu/menu.module	27 Apr 2009 12:50:13 -0000	1.157.2.6
+++ modules/menu/menu.module	31 Oct 2009 08:24:27 -0000
@@ -282,7 +282,7 @@ function menu_block($op = 'list', $delta
     }
     return $blocks;
   }
-  else if ($op == 'view') {
+  elseif ($op == 'view') {
     $data['subject'] = check_plain($menus[$delta]);
     $data['content'] = menu_tree($delta);
     return $data;
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.19.2.3
diff -u -p -r1.19.2.3 node.admin.inc
--- modules/node/node.admin.inc	8 Jun 2009 16:45:34 -0000	1.19.2.3
+++ modules/node/node.admin.inc	31 Oct 2009 08:24:28 -0000
@@ -220,7 +220,7 @@ function node_filter_form() {
       $value = module_invoke('taxonomy', 'get_term', $value);
       $value = $value->name;
     }
-    else if ($type == 'language') {
+    elseif ($type == 'language') {
       $value = empty($value) ? t('Language neutral') : module_invoke('locale', 'language_name', $value);
     }
     else {
@@ -456,7 +456,7 @@ function node_admin_nodes() {
   $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] .' ORDER BY n.changed DESC'), 50, 0, NULL, $filter['args']);
 
   // Enable language column if locale is enabled or if we have any node with language
-  $count = db_result(db_query("SELECT COUNT(*) FROM {node} n WHERE language != ''"));
+  $count = db_result(db_query("SELECT COUNT(*) FROM {node} n WHERE language <> ''"));
   $multilanguage = (module_exists('locale') || $count);
 
   $form['options'] = array(
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.947.2.18
diff -u -p -r1.947.2.18 node.module
--- modules/node/node.module	16 Sep 2009 18:21:06 -0000	1.947.2.18
+++ modules/node/node.module	31 Oct 2009 08:24:29 -0000
@@ -674,7 +674,7 @@ function node_invoke_nodeapi(&$node, $op
     if (isset($result) && is_array($result)) {
       $return = array_merge($return, $result);
     }
-    else if (isset($result)) {
+    elseif (isset($result)) {
       $return[] = $result;
     }
   }
@@ -1625,7 +1625,7 @@ function node_block($op = 'list', $delta
     $blocks[0]['cache'] = BLOCK_NO_CACHE;
     return $blocks;
   }
-  else if ($op == 'view') {
+  elseif ($op == 'view') {
     $block['subject'] = t('Syndicate');
     $block['content'] = theme('feed_icon', url('rss.xml'), t('Syndicate'));
 
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.28.2.4
diff -u -p -r1.28.2.4 node.pages.inc
--- modules/node/node.pages.inc	27 Apr 2009 11:35:01 -0000	1.28.2.4
+++ modules/node/node.pages.inc	31 Oct 2009 08:24:30 -0000
@@ -377,7 +377,7 @@ function node_preview($node) {
         $node->uid = 0; // anonymous user
       }
     }
-    else if ($node->uid) {
+    elseif ($node->uid) {
       $user = user_load(array('uid' => $node->uid));
       $node->name = $user->name;
       $node->picture = $user->picture;
Index: modules/openid/openid.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.inc,v
retrieving revision 1.8.2.1
diff -u -p -r1.8.2.1 openid.inc
--- modules/openid/openid.inc	16 Sep 2009 17:58:24 -0000	1.8.2.1
+++ modules/openid/openid.inc	31 Oct 2009 08:24:30 -0000
@@ -130,7 +130,7 @@ function _openid_create_message($data) {
 
   foreach ($data as $key => $value) {
     if ((strpos($key, ':') !== FALSE) || (strpos($key, "\n") !== FALSE) || (strpos($value, "\n") !== FALSE)) {
-      return null;
+      return NULL;
     }
     $serialized .= "$key:$value\n";
   }
@@ -243,14 +243,14 @@ function _openid_signature($association,
 
 function _openid_hmac($key, $text) {
   if (strlen($key) > OPENID_SHA1_BLOCKSIZE) {
-    $key = _openid_sha1($key, true);
+    $key = _openid_sha1($key, TRUE);
   }
 
   $key = str_pad($key, OPENID_SHA1_BLOCKSIZE, chr(0x00));
   $ipad = str_repeat(chr(0x36), OPENID_SHA1_BLOCKSIZE);
   $opad = str_repeat(chr(0x5c), OPENID_SHA1_BLOCKSIZE);
-  $hash1 = _openid_sha1(($key ^ $ipad) . $text, true);
-  $hmac = _openid_sha1(($key ^ $opad) . $hash1, true);
+  $hash1 = _openid_sha1(($key ^ $ipad) . $text, TRUE);
+  $hmac = _openid_sha1(($key ^ $opad) . $hash1, TRUE);
 
   return $hmac;
 }
@@ -368,7 +368,7 @@ function _openid_dh_rand($stop) {
 }
 
 function _openid_get_bytes($num_bytes) {
-  static $f = null;
+  static $f = NULL;
   $bytes = '';
   if (!isset($f)) {
     $f = @fopen(OPENID_RAND_SOURCE, "r");
@@ -397,7 +397,7 @@ function _openid_response($str = NULL) {
       $str = file_get_contents('php://input');
 
       $post = array();
-      if ($str !== false) {
+      if ($str !== FALSE) {
         $post = _openid_get_params($str);
       }
 
Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.19.2.8
diff -u -p -r1.19.2.8 openid.module
--- modules/openid/openid.module	16 Sep 2009 19:34:14 -0000	1.19.2.8
+++ modules/openid/openid.module	31 Oct 2009 08:24:30 -0000
@@ -184,7 +184,7 @@ function openid_begin($claimed_id, $retu
   if (!empty($services[0]['localid'])) {
     $identity = $services[0]['localid'];
   }
-  else if (!empty($services[0]['delegate'])) {
+  elseif (!empty($services[0]['delegate'])) {
     $identity = $services[0]['delegate'];
   }
   else {
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.7.2.1
diff -u -p -r1.7.2.1 path.admin.inc
--- modules/path/path.admin.inc	22 Nov 2008 10:49:15 -0000	1.7.2.1
+++ modules/path/path.admin.inc	31 Oct 2009 08:24:30 -0000
@@ -15,7 +15,7 @@ function path_admin_overview($keys = NUL
   // Add the filter form above the overview table.
   $output = drupal_get_form('path_admin_filter_form', $keys);
   // Enable language column if locale is enabled or if we have any alias with language
-  $count = db_result(db_query("SELECT COUNT(*) FROM {url_alias} WHERE language != ''"));
+  $count = db_result(db_query("SELECT COUNT(*) FROM {url_alias} WHERE language <> ''"));
   $multilanguage = (module_exists('locale') || $count);
 
   if ($keys) {
@@ -135,7 +135,7 @@ function path_admin_form_validate($form,
   // Language is only set if locale module is enabled, otherwise save for all languages.
   $language = isset($form_state['values']['language']) ? $form_state['values']['language'] : '';
 
-  if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE pid != %d AND dst = '%s' AND language = '%s'", $pid, $dst, $language))) {
+  if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE pid <> %d AND dst = '%s' AND language = '%s'", $pid, $dst, $language))) {
     form_set_error('dst', t('The alias %alias is already in use in this language.', array('%alias' => $dst)));
   }
   $item = menu_get_item($src);
Index: modules/path/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.138.2.3
diff -u -p -r1.138.2.3 path.module
--- modules/path/path.module	22 Nov 2008 10:49:15 -0000	1.138.2.3
+++ modules/path/path.module	31 Oct 2009 08:24:31 -0000
@@ -100,7 +100,7 @@ function path_set_alias($path = NULL, $a
       db_query("UPDATE {url_alias} SET src = '%s', dst = '%s', language = '%s' WHERE pid = %d", $path, $alias, $language, $pid);
     }
   }
-  else if ($path && $alias) {
+  elseif ($path && $alias) {
     // Check for existing aliases.
     if ($alias == drupal_get_path_alias($path, $language)) {
       // There is already such an alias, neutral or in this language.
@@ -139,7 +139,7 @@ function path_nodeapi(&$node, $op, $arg)
       case 'validate':
         if (isset($node->path)) {
           $node->path = trim($node->path);
-          if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s' AND language = '%s'", $node->path, "node/$node->nid", $language))) {
+          if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src <> '%s' AND language = '%s'", $node->path, "node/$node->nid", $language))) {
             form_set_error('path', t('The path is already in use.'));
           }
         }
Index: modules/php/php.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/php/php.module,v
retrieving revision 1.8.2.1
diff -u -p -r1.8.2.1 php.module
--- modules/php/php.module	5 Feb 2008 09:29:50 -0000	1.8.2.1
+++ modules/php/php.module	31 Oct 2009 08:24:31 -0000
@@ -24,7 +24,7 @@ function php_help($path, $arg) {
 /**
  * Implementation of hook_filter_tips().
  */
-function php_filter_tips($delta, $format, $long = false) {
+function php_filter_tips($delta, $format, $long = FALSE) {
   global $base_url;
   if ($delta == 0) {
     switch ($long) {
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.263.2.4
diff -u -p -r1.263.2.4 poll.module
--- modules/poll/poll.module	14 Sep 2009 10:16:54 -0000	1.263.2.4
+++ modules/poll/poll.module	31 Oct 2009 08:24:31 -0000
@@ -133,7 +133,7 @@ function poll_block($op = 'list', $delta
       $blocks[0]['info'] = t('Most recent poll');
       return $blocks;
     }
-    else if ($op == 'view') {
+    elseif ($op == 'view') {
       // Retrieve the latest poll.
       $sql = db_rewrite_sql("SELECT MAX(n.created) FROM {node} n INNER JOIN {poll} p ON p.nid = n.nid WHERE n.status = 1 AND p.active = 1");
       $timestamp = db_result(db_query($sql));
Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.8.2.1
diff -u -p -r1.8.2.1 profile.admin.inc
--- modules/profile/profile.admin.inc	16 Oct 2008 12:43:08 -0000	1.8.2.1
+++ modules/profile/profile.admin.inc	31 Oct 2009 08:24:31 -0000
@@ -254,7 +254,7 @@ Unless you know what you are doing, it i
       '#description' => t('To enable browsing this field by value, enter a title for the resulting page. The word <code>%value</code> will be substituted with the corresponding value. An example page title is "People whose favorite color is %value". This is only applicable for a public field.'),
     );
   }
-  else if ($type == 'checkbox') {
+  elseif ($type == 'checkbox') {
     $form['fields']['page'] = array('#type' => 'textfield',
       '#title' => t('Page title'),
       '#default_value' => $edit['page'],
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.236.2.3
diff -u -p -r1.236.2.3 profile.module
--- modules/profile/profile.module	12 Jan 2009 10:09:19 -0000	1.236.2.3
+++ modules/profile/profile.module	31 Oct 2009 08:24:32 -0000
@@ -142,7 +142,7 @@ function profile_block($op = 'list', $de
     $blocks[0]['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE;
     return $blocks;
   }
-  else if ($op == 'configure' && $delta == 0) {
+  elseif ($op == 'configure' && $delta == 0) {
     // Compile a list of fields to show
     $fields = array();
     $result = db_query('SELECT name, title, weight, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS);
@@ -158,10 +158,10 @@ function profile_block($op = 'list', $de
     );
     return $form;
   }
-  else if ($op == 'save' && $delta == 0) {
+  elseif ($op == 'save' && $delta == 0) {
     variable_set('profile_block_author_fields', $edit['profile_block_author_fields']);
   }
-  else if ($op == 'view') {
+  elseif ($op == 'view') {
     if (user_access('access user profiles')) {
       $output = '';
       if ((arg(0) == 'node') && is_numeric(arg(1)) && (arg(2) == NULL)) {
@@ -300,10 +300,10 @@ function profile_view_profile(&$user) {
 
   // Show private fields to administrators and people viewing their own account.
   if (user_access('administer users') || $GLOBALS['user']->uid == $user->uid) {
-    $result = db_query('SELECT * FROM {profile_fields} WHERE visibility != %d ORDER BY category, weight', PROFILE_HIDDEN);
+    $result = db_query('SELECT * FROM {profile_fields} WHERE visibility <> %d ORDER BY category, weight', PROFILE_HIDDEN);
   }
   else {
-    $result = db_query('SELECT * FROM {profile_fields} WHERE visibility != %d AND visibility != %d ORDER BY category, weight', PROFILE_PRIVATE, PROFILE_HIDDEN);
+    $result = db_query('SELECT * FROM {profile_fields} WHERE visibility <> %d AND visibility <> %d ORDER BY category, weight', PROFILE_PRIVATE, PROFILE_HIDDEN);
   }
 
   $fields = array();
@@ -440,7 +440,7 @@ function profile_validate_profile($edit,
         }
       }
     }
-    else if ($field->required && !user_access('administer users')) {
+    elseif ($field->required && !user_access('administer users')) {
       form_set_error($field->name, t('The field %field is required.', array('%field' => $field->title)));
     }
   }
Index: modules/profile/profile.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 profile.pages.inc
--- modules/profile/profile.pages.inc	8 Dec 2007 14:06:22 -0000	1.2
+++ modules/profile/profile.pages.inc	31 Oct 2009 08:24:32 -0000
@@ -29,7 +29,7 @@ function profile_browse() {
 
     // Compile a list of fields to show.
     $fields = array();
-    $result = db_query('SELECT name, title, type, weight, page FROM {profile_fields} WHERE fid != %d AND visibility = %d ORDER BY weight', $field->fid, PROFILE_PUBLIC_LISTINGS);
+    $result = db_query('SELECT name, title, type, weight, page FROM {profile_fields} WHERE fid <> %d AND visibility = %d ORDER BY weight', $field->fid, PROFILE_PUBLIC_LISTINGS);
     while ($record = db_fetch_object($result)) {
       $fields[] = $record;
     }
@@ -55,7 +55,7 @@ function profile_browse() {
     }
 
     // Extract the affected users:
-    $result = pager_query("SELECT u.uid, u.access FROM {users} u INNER JOIN {profile_values} v ON u.uid = v.uid WHERE v.fid = %d AND $query AND u.access != 0 AND u.status != 0 ORDER BY u.access DESC", 20, 0, NULL, $arguments);
+    $result = pager_query("SELECT u.uid, u.access FROM {users} u INNER JOIN {profile_values} v ON u.uid = v.uid WHERE v.fid = %d AND $query AND u.access <> 0 AND u.status <> 0 ORDER BY u.access DESC", 20, 0, NULL, $arguments);
 
     $content = '';
     while ($account = db_fetch_object($result)) {
@@ -76,7 +76,7 @@ function profile_browse() {
     drupal_set_title($title);
     return $output;
   }
-  else if ($name && !$field->fid) {
+  elseif ($name && !$field->fid) {
     drupal_not_found();
   }
   else {
@@ -88,7 +88,7 @@ function profile_browse() {
     }
 
     // Extract the affected users:
-    $result = pager_query('SELECT uid, access FROM {users} WHERE uid > 0 AND status != 0 AND access != 0 ORDER BY access DESC', 20, 0, NULL);
+    $result = pager_query('SELECT uid, access FROM {users} WHERE uid > 0 AND status <> 0 AND access <> 0 ORDER BY access DESC', 20, 0, NULL);
 
     $content = '';
     while ($account = db_fetch_object($result)) {
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.250.2.7
diff -u -p -r1.250.2.7 search.module
--- modules/search/search.module	14 Sep 2009 14:55:09 -0000	1.250.2.7
+++ modules/search/search.module	31 Oct 2009 08:24:33 -0000
@@ -154,7 +154,7 @@ function search_block($op = 'list', $del
     $blocks[0]['cache'] = BLOCK_NO_CACHE;
     return $blocks;
   }
-  else if ($op == 'view' && user_access('search content')) {
+  elseif ($op == 'view' && user_access('search content')) {
     $block['content'] = drupal_get_form('search_block_form');
     $block['subject'] = t('Search');
     return $block;
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.272.2.1
diff -u -p -r1.272.2.1 statistics.module
--- modules/statistics/statistics.module	27 Apr 2009 12:25:24 -0000	1.272.2.1
+++ modules/statistics/statistics.module	31 Oct 2009 08:24:33 -0000
@@ -207,7 +207,7 @@ function statistics_cron() {
  */
 function statistics_title_list($dbfield, $dbrows) {
   if (in_array($dbfield, array('totalcount', 'daycount', 'timestamp'))) {
-    return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE s.". $dbfield ." != 0 AND n.status = 1 ORDER BY s.". $dbfield ." DESC"), 0, $dbrows);
+    return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE s.". $dbfield ." <> 0 AND n.status = 1 ORDER BY s.". $dbfield ." DESC"), 0, $dbrows);
   }
   return FALSE;
 }
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.238.2.18
diff -u -p -r1.238.2.18 system.install
--- modules/system/system.install	14 Sep 2009 13:59:58 -0000	1.238.2.18
+++ modules/system/system.install	31 Oct 2009 08:24:35 -0000
@@ -146,7 +146,7 @@ function system_requirements($phase) {
     if (time() - $cron_last > $threshold_error) {
       $severity = REQUIREMENT_ERROR;
     }
-    else if ($never_run || (time() - $cron_last > $threshold_warning)) {
+    elseif ($never_run || (time() - $cron_last > $threshold_warning)) {
       $severity = REQUIREMENT_WARNING;
     }
 
@@ -691,11 +691,11 @@ function system_schema() {
       'load_functions' => array(
         'description' => 'A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.',
         'type' => 'text',
-        'not null' => TRUE,),
+        'not null' => TRUE, ),
       'to_arg_functions' => array(
         'description' => 'A serialized array of function names (like user_uid_optional_to_arg) to be called to replace a part of the router path with another string.',
         'type' => 'text',
-        'not null' => TRUE,),
+        'not null' => TRUE, ),
       'access_callback' => array(
         'description' => 'The callback which determines the access to this router path. Defaults to user_access.',
         'type' => 'varchar',
@@ -2351,9 +2351,9 @@ function system_update_6043() {
   db_add_index($ret, 'history', 'nid', array('nid'));
   // Change length of theme field in {blocks} to be consistent with module, and
   // to avoid a MySQL error regarding a too-long index.  Also add new indices.
-  db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),array(
-                  'unique keys' => array('tmd' => array('theme', 'module', 'delta'),),
-                  'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'),),));
+  db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), array(
+                  'unique keys' => array('tmd' => array('theme', 'module', 'delta'), ),
+                  'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'), ), ));
   db_add_index($ret, 'blocks_roles', 'rid', array('rid'));
   // Improve filter module indices.
   db_drop_index($ret, 'filters', 'weight');
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.414.2.12
diff -u -p -r1.414.2.12 taxonomy.module
--- modules/taxonomy/taxonomy.module	15 Sep 2009 11:13:08 -0000	1.414.2.12
+++ modules/taxonomy/taxonomy.module	31 Oct 2009 08:24:36 -0000
@@ -210,7 +210,7 @@ function taxonomy_save_vocabulary(&$edit
     module_invoke_all('taxonomy', 'update', 'vocabulary', $edit);
     $status = SAVED_UPDATED;
   }
-  else if (!empty($edit['vid'])) {
+  elseif (!empty($edit['vid'])) {
     $status = taxonomy_del_vocabulary($edit['vid']);
   }
   else {
@@ -311,7 +311,7 @@ function taxonomy_save_term(&$form_value
     $hook = 'update';
     $status = SAVED_UPDATED;
   }
-  else if (!empty($form_values['tid'])) {
+  elseif (!empty($form_values['tid'])) {
     return taxonomy_del_term($form_values['tid']);
   }
   else {
@@ -694,10 +694,10 @@ function taxonomy_node_save($node, $term
           }
         }
       }
-      else if (is_object($term)) {
+      elseif (is_object($term)) {
         db_query('INSERT INTO {term_node} (nid, vid, tid) VALUES (%d, %d, %d)', $node->nid, $node->vid, $term->tid);
       }
-      else if ($term) {
+      elseif ($term) {
         db_query('INSERT INTO {term_node} (nid, vid, tid) VALUES (%d, %d, %d)', $node->nid, $node->vid, $term);
       }
     }
@@ -1237,7 +1237,7 @@ function taxonomy_terms_parse_string($st
     // The '+' character in a query string may be parsed as ' '.
     $terms['tids'] = preg_split('/[+ ]/', $str_tids);
   }
-  else if (preg_match('/^([0-9]+,)*[0-9]+$/', $str_tids)) {
+  elseif (preg_match('/^([0-9]+,)*[0-9]+$/', $str_tids)) {
     $terms['operator'] = 'and';
     $terms['tids'] = explode(',', $str_tids);
   }
Index: modules/translation/translation.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v
retrieving revision 1.23.2.4
diff -u -p -r1.23.2.4 translation.module
--- modules/translation/translation.module	14 Jan 2009 23:34:07 -0000	1.23.2.4
+++ modules/translation/translation.module	31 Oct 2009 08:24:36 -0000
@@ -236,7 +236,7 @@ function translation_nodeapi(&$node, $op
         db_query("UPDATE {node} SET tnid = %d, translate = %d WHERE nid = %d", $node->tnid, $node->translation['status'], $node->nid);
         if (!empty($node->translation['retranslate'])) {
           // This is the source node, asking to mark all translations outdated.
-          db_query("UPDATE {node} SET translate = 1 WHERE tnid = %d AND nid != %d", $node->tnid, $node->nid);
+          db_query("UPDATE {node} SET translate = 1 WHERE tnid = %d AND nid <> %d", $node->tnid, $node->nid);
         }
       }
       break;
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.197.2.5
diff -u -p -r1.197.2.5 upload.module
--- modules/upload/upload.module	16 Sep 2009 17:54:19 -0000	1.197.2.5
+++ modules/upload/upload.module	31 Oct 2009 08:24:36 -0000
@@ -579,7 +579,7 @@ function upload_js() {
   // Handle new uploads, and merge tmp files into node-files.
   upload_node_form_submit($cached_form, $form_state);
 
-  if(!empty($form_state['values']['files'])) {
+  if (!empty($form_state['values']['files'])) {
     foreach ($form_state['values']['files'] as $fid => $file) {
       if (isset($cached_form['#node']->files[$fid])) {
         $files[$fid] = $cached_form['#node']->files[$fid];
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.18.2.1
diff -u -p -r1.18.2.1 user.admin.inc
--- modules/user/user.admin.inc	13 Aug 2008 23:59:14 -0000	1.18.2.1
+++ modules/user/user.admin.inc	31 Oct 2009 08:24:37 -0000
@@ -139,9 +139,9 @@ function user_admin_account() {
     t('Operations')
   );
 
-  $sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'];
+  $sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid <> 0 '. $filter['where'];
   $sql .= tablesort_sql($header);
-  $query_count = 'SELECT COUNT(DISTINCT u.uid) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'];
+  $query_count = 'SELECT COUNT(DISTINCT u.uid) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid <> 0 '. $filter['where'];
   $result = pager_query($sql, 50, 0, $query_count, $filter['args']);
 
   $form['options'] = array(
@@ -660,11 +660,11 @@ function user_admin_role() {
 function user_admin_role_validate($form, &$form_state) {
   if ($form_state['values']['name']) {
     if ($form_state['values']['op'] == t('Save role')) {
-      if (db_result(db_query("SELECT COUNT(*) FROM {role} WHERE name = '%s' AND rid != %d", $form_state['values']['name'], $form_state['values']['rid']))) {
+      if (db_result(db_query("SELECT COUNT(*) FROM {role} WHERE name = '%s' AND rid <> %d", $form_state['values']['name'], $form_state['values']['rid']))) {
         form_set_error('name', t('The role name %name already exists. Please choose another role name.', array('%name' => $form_state['values']['name'])));
       }
     }
-    else if ($form_state['values']['op'] == t('Add role')) {
+    elseif ($form_state['values']['op'] == t('Add role')) {
       if (db_result(db_query("SELECT COUNT(*) FROM {role} WHERE name = '%s'", $form_state['values']['name']))) {
         form_set_error('name', t('The role name %name already exists. Please choose another role name.', array('%name' => $form_state['values']['name'])));
       }
@@ -680,7 +680,7 @@ function user_admin_role_submit($form, &
     db_query("UPDATE {role} SET name = '%s' WHERE rid = %d", $form_state['values']['name'], $form_state['values']['rid']);
     drupal_set_message(t('The role has been renamed.'));
   }
-  else if ($form_state['values']['op'] == t('Delete role')) {
+  elseif ($form_state['values']['op'] == t('Delete role')) {
     db_query('DELETE FROM {role} WHERE rid = %d', $form_state['values']['rid']);
     db_query('DELETE FROM {permission} WHERE rid = %d', $form_state['values']['rid']);
     // Update the users who have this role set:
@@ -688,7 +688,7 @@ function user_admin_role_submit($form, &
 
     drupal_set_message(t('The role has been deleted.'));
   }
-  else if ($form_state['values']['op'] == t('Add role')) {
+  elseif ($form_state['values']['op'] == t('Add role')) {
     db_query("INSERT INTO {role} (name) VALUES ('%s')", $form_state['values']['name']);
     drupal_set_message(t('The role has been added.'));
   }
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.892.2.18
diff -u -p -r1.892.2.18 user.module
--- modules/user/user.module	16 Sep 2009 17:54:19 -0000	1.892.2.18
+++ modules/user/user.module	31 Oct 2009 08:24:39 -0000
@@ -155,7 +155,7 @@ function user_load($array = array()) {
       $query[] = "$key = %d";
       $params[] = $value;
     }
-    else if ($key == 'pass') {
+    elseif ($key == 'pass') {
       $query[] = "pass = '%s'";
       $params[] = md5($value);
     }
@@ -224,13 +224,13 @@ function user_save($account, $array = ar
         $query .= "$key = '%s', ";
         $v[] = md5($value);
       }
-      else if ((substr($key, 0, 4) !== 'auth') && ($key != 'pass')) {
+      elseif ((substr($key, 0, 4) !== 'auth') && ($key != 'pass')) {
         if (in_array($key, $user_fields)) {
           // Save standard fields.
           $query .= "$key = '%s', ";
           $v[] = $value;
         }
-        else if ($key != 'roles') {
+        elseif ($key != 'roles') {
           // Roles is a special case: it used below.
           if ($value === NULL) {
             unset($data[$key]);
@@ -696,7 +696,7 @@ function user_block($op = 'list', $delta
     $blocks[3]['cache'] = BLOCK_NO_CACHE;
     return $blocks;
   }
-  else if ($op == 'configure' && $delta == 2) {
+  elseif ($op == 'configure' && $delta == 2) {
     $form['user_block_whois_new_count'] = array(
       '#type' => 'select',
       '#title' => t('Number of users to display'),
@@ -705,21 +705,21 @@ function user_block($op = 'list', $delta
     );
     return $form;
   }
-  else if ($op == 'configure' && $delta == 3) {
+  elseif ($op == 'configure' && $delta == 3) {
     $period = drupal_map_assoc(array(30, 60, 120, 180, 300, 600, 900, 1800, 2700, 3600, 5400, 7200, 10800, 21600, 43200, 86400), 'format_interval');
     $form['user_block_seconds_online'] = array('#type' => 'select', '#title' => t('User activity'), '#default_value' => variable_get('user_block_seconds_online', 900), '#options' => $period, '#description' => t('A user is considered online for this long after they have last viewed a page.'));
     $form['user_block_max_list_count'] = array('#type' => 'select', '#title' => t('User list length'), '#default_value' => variable_get('user_block_max_list_count', 10), '#options' => drupal_map_assoc(array(0, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100)), '#description' => t('Maximum number of currently online users to display.'));
 
     return $form;
   }
-  else if ($op == 'save' && $delta == 2) {
+  elseif ($op == 'save' && $delta == 2) {
     variable_set('user_block_whois_new_count', $edit['user_block_whois_new_count']);
   }
-  else if ($op == 'save' && $delta == 3) {
+  elseif ($op == 'save' && $delta == 3) {
     variable_set('user_block_seconds_online', $edit['user_block_seconds_online']);
     variable_set('user_block_max_list_count', $edit['user_block_max_list_count']);
   }
-  else if ($op == 'view') {
+  elseif ($op == 'view') {
     $block = array();
 
     switch ($delta) {
@@ -742,7 +742,7 @@ function user_block($op = 'list', $delta
       case 2:
         if (user_access('access content')) {
           // Retrieve a list of new users who have subsequently accessed the site successfully.
-          $result = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', 0, variable_get('user_block_whois_new_count', 5));
+          $result = db_query_range('SELECT uid, name FROM {users} WHERE status <> 0 AND access <> 0 ORDER BY created DESC', 0, variable_get('user_block_whois_new_count', 5));
           while ($account = db_fetch_object($result)) {
             $items[] = $account;
           }
@@ -810,7 +810,7 @@ function template_preprocess_user_pictur
     if (!empty($account->picture) && file_exists($account->picture)) {
       $picture = file_create_url($account->picture);
     }
-    else if (variable_get('user_picture_default', '')) {
+    elseif (variable_get('user_picture_default', '')) {
       $picture = variable_get('user_picture_default', '');
     }
 
@@ -1294,7 +1294,7 @@ function user_login_name_validate($form,
       // blocked in user administration
       form_set_error('name', t('The username %name has not been activated or is blocked.', array('%name' => $form_state['values']['name'])));
     }
-    else if (drupal_is_denied('user', $form_state['values']['name'])) {
+    elseif (drupal_is_denied('user', $form_state['values']['name'])) {
       // denied by access controls
       form_set_error('name', t('The name %name is a reserved username.', array('%name' => $form_state['values']['name'])));
     }
@@ -1556,10 +1556,10 @@ function _user_edit_validate($uid, &$edi
     if ($error = user_validate_name($edit['name'])) {
       form_set_error('name', $error);
     }
-    else if (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(name) = LOWER('%s')", $uid, $edit['name'])) > 0) {
+    elseif (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid <> %d AND LOWER(name) = LOWER('%s')", $uid, $edit['name'])) > 0) {
       form_set_error('name', t('The name %name is already taken.', array('%name' => $edit['name'])));
     }
-    else if (drupal_is_denied('user', $edit['name'])) {
+    elseif (drupal_is_denied('user', $edit['name'])) {
       form_set_error('name', t('The name %name has been denied access.', array('%name' => $edit['name'])));
     }
   }
@@ -1568,10 +1568,10 @@ function _user_edit_validate($uid, &$edi
   if ($error = user_validate_mail($edit['mail'])) {
     form_set_error('mail', $error);
   }
-  else if (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
+  elseif (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid <> %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
     form_set_error('mail', t('The e-mail address %email is already registered. <a href="@password">Have you forgotten your password?</a>', array('%email' => $edit['mail'], '@password' => url('user/password'))));
   }
-  else if (drupal_is_denied('mail', $edit['mail'])) {
+  elseif (drupal_is_denied('mail', $edit['mail'])) {
     form_set_error('mail', t('The e-mail address %email has been denied access.', array('%email' => $edit['mail'])));
   }
 }
@@ -2350,7 +2350,7 @@ function user_register_submit($form, &$f
     if ($admin && !$notify) {
       drupal_set_message(t('Created a new user account for <a href="@url">%name</a>. No e-mail has been sent.', array('@url' => url("user/$account->uid"), '%name' => $account->name)));
     }
-    else if (!variable_get('user_email_verification', TRUE) && $account->status && !$admin) {
+    elseif (!variable_get('user_email_verification', TRUE) && $account->status && !$admin) {
       // No e-mail verification is required, create new user account, and login
       // user immediately.
       _user_mail_notify('register_no_approval_required', $account);
@@ -2360,7 +2360,7 @@ function user_register_submit($form, &$f
       $form_state['redirect'] = '';
       return;
     }
-    else if ($account->status || $notify) {
+    elseif ($account->status || $notify) {
       // Create new user account, no administrator approval required.
       $op = $notify ? 'register_admin_created' : 'register_no_approval_required';
       _user_mail_notify($op, $account);
Index: modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.11.2.2
diff -u -p -r1.11.2.2 user.pages.inc
--- modules/user/user.pages.inc	16 Sep 2009 17:54:20 -0000	1.11.2.2
+++ modules/user/user.pages.inc	31 Oct 2009 08:24:39 -0000
@@ -105,7 +105,7 @@ function user_pass_reset(&$form_state, $
         drupal_set_message(t('You have tried to use a one-time login link that has expired. Please request a new one using the form below.'));
         drupal_goto('user/password');
       }
-      else if ($account->uid && $timestamp > $account->login && $timestamp < $current && $hashed_pass == user_pass_rehash($account->pass, $timestamp, $account->login)) {
+      elseif ($account->uid && $timestamp > $account->login && $timestamp < $current && $hashed_pass == user_pass_rehash($account->pass, $timestamp, $account->login)) {
         // First stage is a confirmation form, then login
         if ($action == 'login') {
           watchdog('user', 'User %name used one-time login link at time %timestamp.', array('%name' => $account->name, '%timestamp' => $timestamp));
