Commit f76acb2d authored by webchick's avatar webchick

#282405 by Damien Tournoud, lilou, Dave Reid: Enforce coding standard on elseif.

parent a765e882
...@@ -168,7 +168,7 @@ function cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE) { ...@@ -168,7 +168,7 @@ function cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE) {
// This is the first request to clear the cache, start a timer. // This is the first request to clear the cache, start a timer.
variable_set('cache_flush', REQUEST_TIME); variable_set('cache_flush', REQUEST_TIME);
} }
else if (REQUEST_TIME > ($cache_flush + variable_get('cache_lifetime', 0))) { elseif (REQUEST_TIME > ($cache_flush + variable_get('cache_lifetime', 0))) {
// Clear the cache for everyone, cache_flush_delay seconds have // Clear the cache for everyone, cache_flush_delay seconds have
// passed since the first request to clear the cache. // passed since the first request to clear the cache.
db_delete($table) db_delete($table)
......
...@@ -1247,25 +1247,25 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL ...@@ -1247,25 +1247,25 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
if (strpos('AaDlM', $c) !== FALSE) { if (strpos('AaDlM', $c) !== FALSE) {
$date .= t(gmdate($c, $timestamp), array(), $langcode); $date .= t(gmdate($c, $timestamp), array(), $langcode);
} }
else if ($c == 'F') { elseif ($c == 'F') {
// Special treatment for long month names: May is both an abbreviation // Special treatment for long month names: May is both an abbreviation
// and a full month name in English, but other languages have // and a full month name in English, but other languages have
// different abbreviations. // different abbreviations.
$date .= trim(t('!long-month-name ' . gmdate($c, $timestamp), array('!long-month-name' => ''), $langcode)); $date .= trim(t('!long-month-name ' . gmdate($c, $timestamp), array('!long-month-name' => ''), $langcode));
} }
else if (strpos('BdgGhHiIjLmnsStTUwWYyz', $c) !== FALSE) { elseif (strpos('BdgGhHiIjLmnsStTUwWYyz', $c) !== FALSE) {
$date .= gmdate($c, $timestamp); $date .= gmdate($c, $timestamp);
} }
else if ($c == 'r') { elseif ($c == 'r') {
$date .= format_date($timestamp - $timezone, 'custom', 'D, d M Y H:i:s O', $timezone, $langcode); $date .= format_date($timestamp - $timezone, 'custom', 'D, d M Y H:i:s O', $timezone, $langcode);
} }
else if ($c == 'O') { elseif ($c == 'O') {
$date .= sprintf('%s%02d%02d', ($timezone < 0 ? '-' : '+'), abs($timezone / 3600), abs($timezone % 3600) / 60); $date .= sprintf('%s%02d%02d', ($timezone < 0 ? '-' : '+'), abs($timezone / 3600), abs($timezone % 3600) / 60);
} }
else if ($c == 'Z') { elseif ($c == 'Z') {
$date .= $timezone; $date .= $timezone;
} }
else if ($c == '\\') { elseif ($c == '\\') {
$date .= $format[++$i]; $date .= $format[++$i];
} }
else { else {
...@@ -1789,7 +1789,7 @@ function drupal_get_css($css = NULL) { ...@@ -1789,7 +1789,7 @@ function drupal_get_css($css = NULL) {
} }
// If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*, // If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*,
// regardless of whether preprocessing is on or off. // regardless of whether preprocessing is on or off.
else if (!$preprocess && $type == 'theme') { elseif (!$preprocess && $type == 'theme') {
$no_theme_preprocess .= '<link type="text/css" rel="stylesheet" media="' . $media . '" href="' . base_path() . $file . $query_string . '" />' . "\n"; $no_theme_preprocess .= '<link type="text/css" rel="stylesheet" media="' . $media . '" href="' . base_path() . $file . $query_string . '" />' . "\n";
} }
else { else {
...@@ -2559,7 +2559,7 @@ function page_set_cache() { ...@@ -2559,7 +2559,7 @@ function page_set_cache() {
if (zlib_get_coding_type() == 'deflate') { if (zlib_get_coding_type() == 'deflate') {
$cache = FALSE; $cache = FALSE;
} }
else if (zlib_get_coding_type() == FALSE) { elseif (zlib_get_coding_type() == FALSE) {
$data = gzencode($data, 9, FORCE_GZIP); $data = gzencode($data, 9, FORCE_GZIP);
} }
// The remaining case is 'gzip' which means the data is // The remaining case is 'gzip' which means the data is
......
...@@ -128,11 +128,11 @@ function file_create_path($destination = NULL) { ...@@ -128,11 +128,11 @@ function file_create_path($destination = NULL) {
} }
// Check if the destination is instead inside the Drupal temporary files // Check if the destination is instead inside the Drupal temporary files
// directory. // directory.
else if (file_check_location($destination, file_directory_temp())) { elseif (file_check_location($destination, file_directory_temp())) {
return $destination; return $destination;
} }
// Not found, try again with prefixed directory path. // Not found, try again with prefixed directory path.
else if (file_check_location($file_path . '/' . $destination, $file_path)) { elseif (file_check_location($file_path . '/' . $destination, $file_path)) {
return $file_path . '/' . $destination; return $file_path . '/' . $destination;
} }
// File not found. // File not found.
......
...@@ -488,7 +488,7 @@ function drupal_prepare_form($form_id, &$form, &$form_state) { ...@@ -488,7 +488,7 @@ function drupal_prepare_form($form_id, &$form, &$form_state) {
$form['form_token'] = array('#type' => 'token', '#default_value' => drupal_get_token($form['#token'])); $form['form_token'] = array('#type' => 'token', '#default_value' => drupal_get_token($form['#token']));
} }
} }
else if (isset($user->uid) && $user->uid && !$form['#programmed']) { elseif (isset($user->uid) && $user->uid && !$form['#programmed']) {
$form['#token'] = $form_id; $form['#token'] = $form_id;
$form['form_token'] = array( $form['form_token'] = array(
'#id' => form_clean_id('edit-' . $form_id . '-form-token'), '#id' => form_clean_id('edit-' . $form_id . '-form-token'),
...@@ -1375,7 +1375,7 @@ function form_options_flatten($array, $reset = TRUE) { ...@@ -1375,7 +1375,7 @@ function form_options_flatten($array, $reset = TRUE) {
if (is_object($value)) { if (is_object($value)) {
form_options_flatten($value->option, FALSE); form_options_flatten($value->option, FALSE);
} }
else if (is_array($value)) { elseif (is_array($value)) {
form_options_flatten($value, FALSE); form_options_flatten($value, FALSE);
} }
else { else {
...@@ -1479,12 +1479,12 @@ function form_get_options($element, $key) { ...@@ -1479,12 +1479,12 @@ function form_get_options($element, $key) {
if (is_array($choice)) { if (is_array($choice)) {
return FALSE; return FALSE;
} }
else if (is_object($choice)) { elseif (is_object($choice)) {
if (isset($choice->option[$key])) { if (isset($choice->option[$key])) {
$keys[] = $index; $keys[] = $index;
} }
} }
else if ($index == $key) { elseif ($index == $key) {
$keys[] = $index; $keys[] = $index;
} }
} }
......
...@@ -1320,7 +1320,7 @@ function _locale_import_one_string_db(&$report, $langcode, $source, $translation ...@@ -1320,7 +1320,7 @@ function _locale_import_one_string_db(&$report, $langcode, $source, $translation
db_query("INSERT INTO {locales_target} (lid, language, translation, plid, plural) VALUES (%d, '%s', '%s', %d, %d)", $lid, $langcode, $translation, $plid, $plural); db_query("INSERT INTO {locales_target} (lid, language, translation, plid, plural) VALUES (%d, '%s', '%s', %d, %d)", $lid, $langcode, $translation, $plid, $plural);
$report[0]++; $report[0]++;
} }
else if ($mode == LOCALE_IMPORT_OVERWRITE) { elseif ($mode == LOCALE_IMPORT_OVERWRITE) {
// Translation exists, only overwrite if instructed. // Translation exists, only overwrite if instructed.
db_query("UPDATE {locales_target} SET translation = '%s', plid = %d, plural = %d WHERE language = '%s' AND lid = %d", $translation, $plid, $plural, $langcode, $lid); db_query("UPDATE {locales_target} SET translation = '%s', plid = %d, plural = %d WHERE language = '%s' AND lid = %d", $translation, $plid, $plural, $langcode, $lid);
$report[1]++; $report[1]++;
......
...@@ -476,7 +476,7 @@ function module_invoke_all() { ...@@ -476,7 +476,7 @@ function module_invoke_all() {
if (isset($result) && is_array($result)) { if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result); $return = array_merge_recursive($return, $result);
} }
else if (isset($result)) { elseif (isset($result)) {
$return[] = $result; $return[] = $result;
} }
} }
......
...@@ -401,7 +401,7 @@ function theme_pager_link($text, $page_new, $element, $parameters = array(), $at ...@@ -401,7 +401,7 @@ function theme_pager_link($text, $page_new, $element, $parameters = array(), $at
if (isset($titles[$text])) { if (isset($titles[$text])) {
$attributes['title'] = $titles[$text]; $attributes['title'] = $titles[$text];
} }
else if (is_numeric($text)) { elseif (is_numeric($text)) {
$attributes['title'] = t('Go to page @number', array('@number' => $text)); $attributes['title'] = t('Go to page @number', array('@number' => $text));
} }
} }
......
...@@ -1128,7 +1128,7 @@ function theme_links($links, $attributes = array('class' => 'links')) { ...@@ -1128,7 +1128,7 @@ function theme_links($links, $attributes = array('class' => 'links')) {
// Pass in $link as $options, they share the same keys. // Pass in $link as $options, they share the same keys.
$output .= l($link['title'], $link['href'], $link); $output .= l($link['title'], $link['href'], $link);
} }
else if (!empty($link['title'])) { elseif (!empty($link['title'])) {
// Some links are actually not links, but we wrap these in <span> for adding title and class attributes // Some links are actually not links, but we wrap these in <span> for adding title and class attributes
if (empty($link['html'])) { if (empty($link['html'])) {
$link['title'] = check_plain($link['title']); $link['title'] = check_plain($link['title']);
...@@ -1457,7 +1457,7 @@ function theme_mark($type = MARK_NEW) { ...@@ -1457,7 +1457,7 @@ function theme_mark($type = MARK_NEW) {
if ($type == MARK_NEW) { if ($type == MARK_NEW) {
return ' <span class="marker">' . t('new') . '</span>'; return ' <span class="marker">' . t('new') . '</span>';
} }
else if ($type == MARK_UPDATED) { elseif ($type == MARK_UPDATED) {
return ' <span class="marker">' . t('updated') . '</span>'; return ' <span class="marker">' . t('updated') . '</span>';
} }
} }
...@@ -1639,7 +1639,7 @@ function theme_username($object) { ...@@ -1639,7 +1639,7 @@ function theme_username($object) {
$output = check_plain($name); $output = check_plain($name);
} }
} }
else if ($object->name) { elseif ($object->name) {
// Sometimes modules display content composed by people who are // Sometimes modules display content composed by people who are
// not registered members of the site (e.g. mailing list or news // not registered members of the site (e.g. mailing list or news
// aggregator modules). This clause enables modules to display // aggregator modules). This clause enables modules to display
......
...@@ -174,10 +174,10 @@ function drupal_convert_to_utf8($data, $encoding) { ...@@ -174,10 +174,10 @@ function drupal_convert_to_utf8($data, $encoding) {
if (function_exists('iconv')) { if (function_exists('iconv')) {
$out = @iconv($encoding, 'utf-8', $data); $out = @iconv($encoding, 'utf-8', $data);
} }
else if (function_exists('mb_convert_encoding')) { elseif (function_exists('mb_convert_encoding')) {
$out = @mb_convert_encoding($data, 'utf-8', $encoding); $out = @mb_convert_encoding($data, 'utf-8', $encoding);
} }
else if (function_exists('recode_string')) { elseif (function_exists('recode_string')) {
$out = @recode_string($encoding . '..utf-8', $data); $out = @recode_string($encoding . '..utf-8', $data);
} }
else { else {
...@@ -370,16 +370,16 @@ function _decode_entities($prefix, $codepoint, $original, &$table, &$exclude) { ...@@ -370,16 +370,16 @@ function _decode_entities($prefix, $codepoint, $original, &$table, &$exclude) {
if ($codepoint < 0x80) { if ($codepoint < 0x80) {
$str = chr($codepoint); $str = chr($codepoint);
} }
else if ($codepoint < 0x800) { elseif ($codepoint < 0x800) {
$str = chr(0xC0 | ($codepoint >> 6)) $str = chr(0xC0 | ($codepoint >> 6))
. chr(0x80 | ($codepoint & 0x3F)); . chr(0x80 | ($codepoint & 0x3F));
} }
else if ($codepoint < 0x10000) { elseif ($codepoint < 0x10000) {
$str = chr(0xE0 | ( $codepoint >> 12)) $str = chr(0xE0 | ( $codepoint >> 12))
. chr(0x80 | (($codepoint >> 6) & 0x3F)) . chr(0x80 | (($codepoint >> 6) & 0x3F))
. chr(0x80 | ( $codepoint & 0x3F)); . chr(0x80 | ( $codepoint & 0x3F));
} }
else if ($codepoint < 0x200000) { elseif ($codepoint < 0x200000) {
$str = chr(0xF0 | ( $codepoint >> 18)) $str = chr(0xF0 | ( $codepoint >> 18))
. chr(0x80 | (($codepoint >> 12) & 0x3F)) . chr(0x80 | (($codepoint >> 12) & 0x3F))
. chr(0x80 | (($codepoint >> 6) & 0x3F)) . chr(0x80 | (($codepoint >> 6) & 0x3F))
...@@ -488,7 +488,7 @@ function drupal_substr($text, $start, $length = NULL) { ...@@ -488,7 +488,7 @@ function drupal_substr($text, $start, $length = NULL) {
} }
} }
} }
else if ($start < 0) { elseif ($start < 0) {
// Count all the continuation bytes from the end until we have found // Count all the continuation bytes from the end until we have found
// abs($start) characters // abs($start) characters
$start = abs($start); $start = abs($start);
...@@ -507,7 +507,7 @@ function drupal_substr($text, $start, $length = NULL) { ...@@ -507,7 +507,7 @@ function drupal_substr($text, $start, $length = NULL) {
if ($length === NULL) { if ($length === NULL) {
$bytes = $strlen - 1; $bytes = $strlen - 1;
} }
else if ($length > 0) { elseif ($length > 0) {
// Count all the continuation bytes from the starting index until we have // Count all the continuation bytes from the starting index until we have
// found $length + 1 characters. Then backtrack one byte. // found $length + 1 characters. Then backtrack one byte.
$bytes = $istart; $chars = 0; $bytes = $istart; $chars = 0;
...@@ -520,7 +520,7 @@ function drupal_substr($text, $start, $length = NULL) { ...@@ -520,7 +520,7 @@ function drupal_substr($text, $start, $length = NULL) {
} }
$bytes--; $bytes--;
} }
else if ($length < 0) { elseif ($length < 0) {
// Count all the continuation bytes from the end until we have found // Count all the continuation bytes from the end until we have found
// abs($length) characters // abs($length) characters
$length = abs($length); $length = abs($length);
......
...@@ -801,7 +801,7 @@ function aggregator_parse_feed(&$data, $feed) { ...@@ -801,7 +801,7 @@ function aggregator_parse_feed(&$data, $feed) {
if (!empty($guid)) { if (!empty($guid)) {
$entry = db_fetch_object(db_query("SELECT iid, timestamp FROM {aggregator_item} WHERE fid = %d AND guid = '%s'", $feed['fid'], $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)); $entry = db_fetch_object(db_query("SELECT iid, timestamp FROM {aggregator_item} WHERE fid = %d AND link = '%s'", $feed['fid'], $link));
} }
else { else {
......
...@@ -19,7 +19,7 @@ function blog_page_user($account) { ...@@ -19,7 +19,7 @@ function blog_page_user($account) {
if (($account->uid == $user->uid) && user_access('create blog content')) { if (($account->uid == $user->uid) && user_access('create blog content')) {
$items[] = l(t('Post new blog entry.'), "node/add/blog"); $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.'); $items[] = t('You are not allowed to post a new blog entry.');
} }
......
...@@ -88,7 +88,7 @@ function comment_reply($node, $pid = NULL) { ...@@ -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. // 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); $output .= node_view($node);
} }
...@@ -97,7 +97,7 @@ function comment_reply($node, $pid = NULL) { ...@@ -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_set_message(t("This discussion is closed: you can't post new comments."), 'error');
drupal_goto("node/$node->nid"); 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')); $output .= comment_form_box(array('pid' => $pid, 'nid' => $node->nid), t('Reply'));
} }
else { else {
......
...@@ -160,7 +160,7 @@ function contact_user_page($account) { ...@@ -160,7 +160,7 @@ function contact_user_page($account) {
if (!valid_email_address($user->mail)) { 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())))); $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))); $output = t("You cannot send more than %number messages per hour. Please try again later.", array('%number' => variable_get('contact_hourly_threshold', 3)));
} }
else { else {
......
...@@ -880,12 +880,12 @@ function _filter_autop($text) { ...@@ -880,12 +880,12 @@ function _filter_autop($text) {
} }
} }
// Only allow a matching tag to close it. // Only allow a matching tag to close it.
else if (!$open && $ignoretag == $tag) { elseif (!$open && $ignoretag == $tag) {
$ignore = FALSE; $ignore = FALSE;
$ignoretag = ''; $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('|\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('|<br />\s*<br />|', "\n\n", $chunk);
$chunk = preg_replace('!(<' . $block . '[^>]*>)!', "\n$1", $chunk); // Space things out a little $chunk = preg_replace('!(<' . $block . '[^>]*>)!', "\n$1", $chunk); // Space things out a little
...@@ -1001,7 +1001,7 @@ function _filter_xss_split($m, $store = FALSE) { ...@@ -1001,7 +1001,7 @@ function _filter_xss_split($m, $store = FALSE) {
// We matched a lone ">" character // We matched a lone ">" character
return '&gt;'; return '&gt;';
} }
else if (strlen($string) == 1) { elseif (strlen($string) == 1) {
// We matched a lone "<" character // We matched a lone "<" character
return '&lt;'; return '&lt;';
} }
......
...@@ -162,7 +162,7 @@ class FilterAdminTestCase extends DrupalWebTestCase { ...@@ -162,7 +162,7 @@ class FilterAdminTestCase extends DrupalWebTestCase {
if ($format->name == 'Filtered HTML') { if ($format->name == 'Filtered HTML') {
$filtered = $format->format; $filtered = $format->format;
} }
else if ($format->name == 'Full HTML') { elseif ($format->name == 'Full HTML') {
$full = $format->format; $full = $format->format;
} }
} }
......
...@@ -285,7 +285,7 @@ function _forum_parent_select($tid, $title, $child_type) { ...@@ -285,7 +285,7 @@ function _forum_parent_select($tid, $title, $child_type) {
if ($child_type == 'container') { 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.'); $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.'); $description = t('Forums may be placed at the top (root) level, or inside another container or forum.');
} }
......
...@@ -562,7 +562,7 @@ function locale_update_js_files() { ...@@ -562,7 +562,7 @@ function locale_update_js_files() {
} }
// If no refresh was attempted, but we have new source files, we need // 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. // to store them too. This occurs if current page is in English.
else if ($new_files) { elseif ($new_files) {
variable_set('javascript_parsed', $parsed); variable_set('javascript_parsed', $parsed);
} }
......
...@@ -272,7 +272,7 @@ function menu_block($op = 'list', $delta = '') { ...@@ -272,7 +272,7 @@ function menu_block($op = 'list', $delta = '') {
} }
return $blocks; return $blocks;
} }
else if ($op == 'view') { elseif ($op == 'view') {
$data['subject'] = check_plain($menus[$delta]); $data['subject'] = check_plain($menus[$delta]);
$data['content'] = menu_tree($delta); $data['content'] = menu_tree($delta);
return $data; return $data;
......
...@@ -224,7 +224,7 @@ function node_filter_form() { ...@@ -224,7 +224,7 @@ function node_filter_form() {
$value = module_invoke('taxonomy', 'get_term', $value); $value = module_invoke('taxonomy', 'get_term', $value);
$value = $value->name; $value = $value->name;
} }
else if ($type == 'language') { elseif ($type == 'language') {
$value = empty($value) ? t('Language neutral') : module_invoke('locale', 'language_name', $value); $value = empty($value) ? t('Language neutral') : module_invoke('locale', 'language_name', $value);
} }
else { else {
......
...@@ -718,7 +718,7 @@ function node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { ...@@ -718,7 +718,7 @@ function node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
if (isset($result) && is_array($result)) { if (isset($result) && is_array($result)) {
$return = array_merge($return, $result); $return = array_merge($return, $result);
} }
else if (isset($result)) { elseif (isset($result)) {
$return[] = $result; $return[] = $result;
} }
} }
...@@ -1716,7 +1716,7 @@ function node_block($op = 'list', $delta = '') { ...@@ -1716,7 +1716,7 @@ function node_block($op = 'list', $delta = '') {
$blocks['syndicate']['cache'] = BLOCK_NO_CACHE; $blocks['syndicate']['cache'] = BLOCK_NO_CACHE;
return $blocks; return $blocks;
} }
else if ($op == 'view') { elseif ($op == 'view') {
$block['subject'] = t('Syndicate'); $block['subject'] = t('Syndicate');
$block['content'] = theme('feed_icon', url('rss.xml'), t('Syndicate')); $block['content'] = theme('feed_icon', url('rss.xml'), t('Syndicate'));
......
...@@ -356,7 +356,7 @@ function node_preview($node) { ...@@ -356,7 +356,7 @@ function node_preview($node) {
$node->uid = 0; // anonymous user $node->uid = 0; // anonymous user
} }
} }
else if ($node->uid) { elseif ($node->uid) {
$user = user_load(array('uid' => $node->uid)); $user = user_load(array('uid' => $node->uid));
$node->name = $user->name; $node->name = $user->name;
$node->picture = $user->picture; $node->picture = $user->picture;
......
...@@ -182,7 +182,7 @@ function openid_begin($claimed_id, $return_to = '', $form_values = array()) { ...@@ -182,7 +182,7 @@ function openid_begin($claimed_id, $return_to = '', $form_values = array()) {
if (!empty($services[0]['localid'])) { if (!empty($services[0]['localid'])) {
$identity = $services[0]['localid']; $identity = $services[0]['localid'];
} }
else if (!empty($services[0]['delegate'])) { elseif (!empty($services[0]['delegate'])) {
$identity = $services[0]['delegate']; $identity = $services[0]['delegate'];
} }
else { else {
......
...@@ -93,7 +93,7 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = '' ...@@ -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); 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. // Check for existing aliases.
if ($alias == drupal_get_path_alias($path, $language)) { if ($alias == drupal_get_path_alias($path, $language)) {
// There is already such an alias, neutral or in this language. // There is already such an alias, neutral or in this language.
......
...@@ -146,7 +146,7 @@ function poll_block($op = 'list', $delta = '') { ...@@ -146,7 +146,7 @@ function poll_block($op = 'list', $delta = '') {
$blocks['recent']['info'] = t('Most recent poll'); $blocks['recent']['info'] = t('Most recent poll');
return $blocks; return $blocks;
} }
else if ($op == 'view') { elseif ($op == 'view') {
// Retrieve the latest poll. // 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"); $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)); $timestamp = db_result(db_query($sql));
......
...@@ -254,7 +254,7 @@ function profile_field_form(&$form_state, $arg = NULL) { ...@@ -254,7 +254,7 @@ function profile_field_form(&$form_state, $arg = NULL) {
'#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.'), '#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', $form['fields']['page'] = array('#type' => 'textfield',
'#title' => t('Page title'), '#title' => t('Page title'),
'#default_value' => $edit['page'], '#default_value' => $edit['page'],
......
...@@ -135,7 +135,7 @@ function profile_block($op = 'list', $delta = '', $edit = array()) { ...@@ -135,7 +135,7 @@ function profile_block($op = 'list', $delta = '', $edit = array()) {
$blocks['author-information']['cache']<