summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator/aggregator.module2
-rw-r--r--modules/blog/blog.pages.inc2
-rw-r--r--modules/comment/comment.pages.inc4
-rw-r--r--modules/contact/contact.pages.inc2
-rw-r--r--modules/filter/filter.module6
-rw-r--r--modules/filter/filter.test2
-rw-r--r--modules/forum/forum.admin.inc2
-rw-r--r--modules/locale/locale.module2
-rw-r--r--modules/menu/menu.module2
-rw-r--r--modules/node/node.admin.inc2
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/node/node.pages.inc2
-rw-r--r--modules/openid/openid.module2
-rw-r--r--modules/path/path.module2
-rw-r--r--modules/poll/poll.module2
-rw-r--r--modules/profile/profile.admin.inc2
-rw-r--r--modules/profile/profile.module8
-rw-r--r--modules/profile/profile.pages.inc2
-rw-r--r--modules/search/search.module2
-rw-r--r--modules/simpletest/drupal_web_test_case.php6
-rw-r--r--modules/system/system.admin.inc4
-rw-r--r--modules/system/system.install2
-rw-r--r--modules/taxonomy/taxonomy.module10
-rw-r--r--modules/user/user.admin.inc6
-rw-r--r--modules/user/user.module22
-rw-r--r--modules/user/user.pages.inc2
26 files changed, 52 insertions, 52 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 70d1538cb..1d81233e2 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -801,7 +801,7 @@ function aggregator_parse_feed(&$data, $feed) {
if (!empty($guid)) {
$entry = db_fetch_object(db_query("SELECT iid, timestamp 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, timestamp FROM {aggregator_item} WHERE fid = %d AND link = '%s'", $feed['fid'], $link));
}
else {
diff --git a/modules/blog/blog.pages.inc b/modules/blog/blog.pages.inc
index 2deb15cef..d44bbf5fa 100644
--- a/modules/blog/blog.pages.inc
+++ b/modules/blog/blog.pages.inc
@@ -19,7 +19,7 @@ function blog_page_user($account) {
if (($account->uid == $user->uid) && user_access('create blog content')) {
$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.');
}
diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc
index 789ffde7f..fe97f041b 100644
--- a/modules/comment/comment.pages.inc
+++ b/modules/comment/comment.pages.inc
@@ -88,7 +88,7 @@ function comment_reply($node, $pid = NULL) {
}
}
// 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);
}
@@ -97,7 +97,7 @@ function comment_reply($node, $pid = NULL) {
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 {
diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc
index e9a9f00d3..041c05153 100644
--- a/modules/contact/contact.pages.inc
+++ b/modules/contact/contact.pages.inc
@@ -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", array('query' => 'destination=' . drupal_get_destination()))));
}
- else if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3)) && !user_access('administer site-wide contact form')) {
+ elseif (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3)) && !user_access('administer site-wide contact form')) {
$output = t("You cannot send more than %number messages per hour. Please try again later.", array('%number' => variable_get('contact_hourly_threshold', 3)));
}
else {
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 64c5fc321..e361a0985 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -880,12 +880,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
@@ -1001,7 +1001,7 @@ function _filter_xss_split($m, $store = FALSE) {
// We matched a lone ">" character
return '&gt;';
}
- else if (strlen($string) == 1) {
+ elseif (strlen($string) == 1) {
// We matched a lone "<" character
return '&lt;';
}
diff --git a/modules/filter/filter.test b/modules/filter/filter.test
index 7ee297712..cd6dc1a7e 100644
--- a/modules/filter/filter.test
+++ b/modules/filter/filter.test
@@ -162,7 +162,7 @@ class FilterAdminTestCase extends DrupalWebTestCase {
if ($format->name == 'Filtered HTML') {
$filtered = $format->format;
}
- else if ($format->name == 'Full HTML') {
+ elseif ($format->name == 'Full HTML') {
$full = $format->format;
}
}
diff --git a/modules/forum/forum.admin.inc b/modules/forum/forum.admin.inc
index d39ad3278..e8c8ad050 100644
--- a/modules/forum/forum.admin.inc
+++ b/modules/forum/forum.admin.inc
@@ -285,7 +285,7 @@ function _forum_parent_select($tid, $title, $child_type) {
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.');
}
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index bc4b37070..9a164566c 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -562,7 +562,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);
}
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 55dad4e7c..cc2fcb69c 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -272,7 +272,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;
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index 9f28f5f6e..0573ffc57 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -224,7 +224,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 {
diff --git a/modules/node/node.module b/modules/node/node.module
index 48e75a3be..3c9143335 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -718,7 +718,7 @@ function node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
if (isset($result) && is_array($result)) {
$return = array_merge($return, $result);
}
- else if (isset($result)) {
+ elseif (isset($result)) {
$return[] = $result;
}
}
@@ -1716,7 +1716,7 @@ function node_block($op = 'list', $delta = '') {
$blocks['syndicate']['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'));
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index 452f3f853..fd326ff16 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -356,7 +356,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;
diff --git a/modules/openid/openid.module b/modules/openid/openid.module
index b4057c463..3af31b0d6 100644
--- a/modules/openid/openid.module
+++ b/modules/openid/openid.module
@@ -182,7 +182,7 @@ function openid_begin($claimed_id, $return_to = '', $form_values = array()) {
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 {
diff --git a/modules/path/path.module b/modules/path/path.module
index f4f2a006d..b78754b8e 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -93,7 +93,7 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = ''
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.
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 21d48cba2..f1b725424 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -146,7 +146,7 @@ function poll_block($op = 'list', $delta = '') {
$blocks['recent']['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));
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index 5219dffed..01f3bda32 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -254,7 +254,7 @@ Unless you know what you are doing, it is highly recommended that you prefix the
'#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'],
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index abb70d9c1..9352f4b3b 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -135,7 +135,7 @@ function profile_block($op = 'list', $delta = '', $edit = array()) {
$blocks['author-information']['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE;
return $blocks;
}
- else if ($op == 'configure') {
+ elseif ($op == 'configure') {
// 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);
@@ -152,10 +152,10 @@ function profile_block($op = 'list', $delta = '', $edit = array()) {
);
return $form;
}
- else if ($op == 'save') {
+ elseif ($op == 'save') {
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)) {
@@ -471,7 +471,7 @@ function profile_validate_profile($edit, $category) {
}
}
}
- 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)));
}
}
diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc
index 52946376b..4c1e3678c 100644
--- a/modules/profile/profile.pages.inc
+++ b/modules/profile/profile.pages.inc
@@ -76,7 +76,7 @@ function profile_browse() {
drupal_set_title($title, PASS_THROUGH);
return $output;
}
- else if ($name && !$field->fid) {
+ elseif ($name && !$field->fid) {
drupal_not_found();
}
else {
diff --git a/modules/search/search.module b/modules/search/search.module
index e5ad72185..8be526249 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -167,7 +167,7 @@ function search_block($op = 'list', $delta = '') {
$blocks['form']['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;
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 2198dde22..35042ad2c 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1486,7 +1486,7 @@ class DrupalWebTestCase {
// Input element with correct value.
$found = TRUE;
}
- else if (isset($field->option)) {
+ elseif (isset($field->option)) {
// Select element found.
if ($this->getSelectedItem($field) == $value) {
$found = TRUE;
@@ -1499,7 +1499,7 @@ class DrupalWebTestCase {
}
}
}
- else if (isset($field[0]) && $field[0] == $value) {
+ elseif (isset($field[0]) && $field[0] == $value) {
// Text area with correct text.
$found = TRUE;
}
@@ -1522,7 +1522,7 @@ class DrupalWebTestCase {
if (isset($item['selected'])) {
return $item['value'];
}
- else if ($item->getName() == 'optgroup') {
+ elseif ($item->getName() == 'optgroup') {
if ($value = $this->getSelectedItem($item)) {
return $value;
}
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index a0394ce74..183a97588 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1147,10 +1147,10 @@ function system_ip_blocking_form_validate($form, &$form_state) {
if (db_result(db_query("SELECT * FROM {blocked_ips} WHERE ip = '%s'", $ip))) {
form_set_error('ip', t('This IP address is already blocked.'));
}
- else if ($ip == ip_address()) {
+ elseif ($ip == ip_address()) {
form_set_error('ip', t('You may not block your own IP address.'));
}
- else if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE) == FALSE) {
+ elseif (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE) == FALSE) {
form_set_error('ip', t('Please enter a valid IP address.'));
}
}
diff --git a/modules/system/system.install b/modules/system/system.install
index 3a5904dfd..28834f8a3 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -146,7 +146,7 @@ function system_requirements($phase) {
if (REQUEST_TIME - $cron_last > $threshold_error) {
$severity = REQUIREMENT_ERROR;
}
- else if ($never_run || (REQUEST_TIME - $cron_last > $threshold_warning)) {
+ elseif ($never_run || (REQUEST_TIME - $cron_last > $threshold_warning)) {
$severity = REQUIREMENT_WARNING;
}
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index b36325f5c..99859ddd6 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -227,7 +227,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 {
@@ -328,7 +328,7 @@ function taxonomy_save_term(&$form_values) {
$hook = 'update';
$status = SAVED_UPDATED;
}
- else if (!empty($form_values['tid'])) {
+ elseif (!empty($form_values['tid'])) {
return taxonomy_del_term($form_values['tid']);
}
else {
@@ -713,10 +713,10 @@ function taxonomy_node_save($node, $terms) {
}
}
}
- 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);
}
}
@@ -1285,7 +1285,7 @@ function taxonomy_terms_parse_string($str_tids) {
// 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);
}
diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc
index 84a1c79c2..d2129da70 100644
--- a/modules/user/user.admin.inc
+++ b/modules/user/user.admin.inc
@@ -666,7 +666,7 @@ function user_admin_role_validate($form, &$form_state) {
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'])));
}
@@ -682,7 +682,7 @@ function user_admin_role_submit($form, &$form_state) {
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 {role_permission} WHERE rid = %d', $form_state['values']['rid']);
// Update the users who have this role set:
@@ -690,7 +690,7 @@ function user_admin_role_submit($form, &$form_state) {
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.'));
}
diff --git a/modules/user/user.module b/modules/user/user.module
index ee189ff58..8b666cf1b 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -162,7 +162,7 @@ function user_load($array = array()) {
$query[] = "$key = %d";
$params[] = $value;
}
- else if ($key == 'pass') {
+ elseif ($key == 'pass') {
$query[] = "pass = '%s'";
$params[] = $value;
}
@@ -757,7 +757,7 @@ function user_block($op = 'list', $delta = '', $edit = array()) {
$blocks['online']['cache'] = BLOCK_NO_CACHE;
return $blocks;
}
- else if ($op == 'configure' && $delta == 'new') {
+ elseif ($op == 'configure' && $delta == 'new') {
$form['user_block_whois_new_count'] = array(
'#type' => 'select',
'#title' => t('Number of users to display'),
@@ -766,21 +766,21 @@ function user_block($op = 'list', $delta = '', $edit = array()) {
);
return $form;
}
- else if ($op == 'configure' && $delta == 'online') {
+ elseif ($op == 'configure' && $delta == 'online') {
$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 == 'new') {
+ elseif ($op == 'save' && $delta == 'new') {
variable_set('user_block_whois_new_count', $edit['user_block_whois_new_count']);
}
- else if ($op == 'save' && $delta == 'online') {
+ elseif ($op == 'save' && $delta == 'online') {
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) {
@@ -871,7 +871,7 @@ function template_preprocess_user_picture(&$variables) {
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', '');
}
@@ -1551,7 +1551,7 @@ function _user_edit_validate($uid, &$edit) {
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'])));
}
}
@@ -1560,7 +1560,7 @@ function _user_edit_validate($uid, &$edit) {
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'))));
}
}
@@ -2317,7 +2317,7 @@ function user_register_submit($form, &$form_state) {
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);
@@ -2327,7 +2327,7 @@ function user_register_submit($form, &$form_state) {
$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);
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index 24eb3d6c5..ada98b6fb 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -92,7 +92,7 @@ function user_pass_reset(&$form_state, $uid, $timestamp, $hashed_pass, $action =
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));