- Patch #319666 by Dave Reid: remove unnecessary boolean ternary conditaionals.

merge-requests/26/head
Dries Buytaert 2008-10-29 10:08:52 +00:00
parent ae2e4ccd78
commit 838b433110
5 changed files with 6 additions and 6 deletions

View File

@ -584,7 +584,7 @@ function install_select_locale_form(&$form_state, $locales) {
$form['locale'][$locale->name] = array(
'#type' => 'radio',
'#return_value' => $locale->name,
'#default_value' => ($locale->name == 'en' ? TRUE : FALSE),
'#default_value' => $locale->name == 'en',
'#title' => $name . ($locale->name == 'en' ? ' ' . st('(built-in)') : ''),
'#parents' => array('locale')
);
@ -940,7 +940,7 @@ function install_check_requirements($profile, $verify) {
}
elseif ($writable) {
$requirements['settings file'] = array(
'title' => st('Settings file'),
'title' => st('Settings file'),
'value' => st('Settings file is writable.'),
);
}

View File

@ -385,7 +385,7 @@ function template_preprocess_block_admin_display_form(&$variables) {
$variables['form'][$i]['weight']['#attributes']['class'] = 'block-weight block-weight-' . $region;
$variables['block_listing'][$region][$i]->row_class = isset($block['#attributes']['class']) ? $block['#attributes']['class'] : '';
$variables['block_listing'][$region][$i]->block_modified = isset($block['#attributes']['class']) && strpos($block['#attributes']['class'], 'block-modified') !== FALSE ? TRUE : FALSE;
$variables['block_listing'][$region][$i]->block_modified = isset($block['#attributes']['class']) && strpos($block['#attributes']['class'], 'block-modified') !== FALSE;
$variables['block_listing'][$region][$i]->block_title = drupal_render($block['info']);
$variables['block_listing'][$region][$i]->region_select = drupal_render($block['region']) . drupal_render($block['theme']);
$variables['block_listing'][$region][$i]->weight_select = drupal_render($block['weight']);

View File

@ -951,7 +951,7 @@ function template_preprocess_book_export_html(&$variables) {
$variables['title'] = check_plain($variables['title']);
$variables['base_url'] = $base_url;
$variables['language'] = $language;
$variables['language_rtl'] = (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) ? TRUE : FALSE;
$variables['language_rtl'] = defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL;
$variables['head'] = drupal_get_html_head();
}

View File

@ -1757,7 +1757,7 @@ function node_feed($nids = FALSE, $channel = array()) {
$item->link = url("node/$nid", array('absolute' => TRUE));
if ($item_length != 'title') {
$teaser = ($item_length == 'teaser') ? TRUE : FALSE;
$teaser = ($item_length == 'teaser');
// Filter and prepare node teaser
if (node_hook($item, 'view')) {

View File

@ -659,7 +659,7 @@ function taxonomy_form_term(&$form_state, $vocabulary, $edit = array()) {
'#type' => 'fieldset',
'#title' => t('Advanced options'),
'#collapsible' => TRUE,
'#collapsed' => $vocabulary->hierarchy > 1 ? FALSE : TRUE,
'#collapsed' => $vocabulary->hierarchy < 2,
);
// taxonomy_get_tree and taxonomy_get_parents may contain large numbers of