@@ -188,8 +188,7 @@ discard block |
||
| 188 | 188 | if (isset($config['css_setting'])) { |
| 189 | 189 | if ($config['css_setting'] == 'theme') { |
| 190 | 190 | $settings['content_css'] = implode(',', wysiwyg_get_css()); |
| 191 | - } |
|
| 192 | - else if ($config['css_setting'] == 'self' && isset($config['css_path'])) { |
|
| 191 | + } else if ($config['css_setting'] == 'self' && isset($config['css_path'])) { |
|
| 193 | 192 | $settings['content_css'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme())); |
| 194 | 193 | } |
| 195 | 194 | } |
@@ -367,8 +366,7 @@ discard block |
||
| 367 | 366 | return '-' . $name; |
| 368 | 367 | } |
| 369 | 368 | return $name; |
| 370 | - } |
|
| 371 | - else if ($op == 'remove') { |
|
| 369 | + } else if ($op == 'remove') { |
|
| 372 | 370 | if (strpos($name, '-') === 0) { |
| 373 | 371 | return substr($name, 1); |
| 374 | 372 | } |
@@ -201,8 +201,7 @@ discard block |
||
| 201 | 201 | if (empty($element['format']['guidelines']['#value'])) { |
| 202 | 202 | $element['format']['guidelines']['#value'] = ' '; |
| 203 | 203 | } |
| 204 | - } |
|
| 205 | - else { |
|
| 204 | + } else { |
|
| 206 | 205 | $element[$format]['#attributes']['class'] = (isset($element[$format]['#attributes']['class']) ? $element[$format]['#attributes']['class'] . ' ' : ''); |
| 207 | 206 | $element[$format]['#attributes']['class'] .= 'wysiwyg wysiwyg-format-' . $format . ' wysiwyg-editor-' . $editor . ' wysiwyg-field-' . $field['#id'] . ' wysiwyg-status-' . $status . ' wysiwyg-toggle-' . $toggle . $extra_class; |
| 208 | 207 | } |
@@ -273,8 +272,7 @@ discard block |
||
| 273 | 272 | if (isset($profile->settings['library']) && isset($editor['libraries'][$profile->settings['library']])) { |
| 274 | 273 | $library = $profile->settings['library']; |
| 275 | 274 | $files = $editor['libraries'][$library]['files']; |
| 276 | - } |
|
| 277 | - else { |
|
| 275 | + } else { |
|
| 278 | 276 | // Fallback to the first defined library by default (external libraries can change). |
| 279 | 277 | $library = key($editor['libraries']); |
| 280 | 278 | $files = array_shift($editor['libraries']); |
@@ -284,8 +282,7 @@ discard block |
||
| 284 | 282 | if (is_array($options)) { |
| 285 | 283 | $options += array('type' => 'module', 'scope' => 'header', 'defer' => FALSE, 'cache' => TRUE, 'preprocess' => TRUE); |
| 286 | 284 | drupal_add_js($editor['library path'] . '/' . $file, $options['type'], $options['scope'], $options['defer'], $options['cache'], $options['preprocess']); |
| 287 | - } |
|
| 288 | - else { |
|
| 285 | + } else { |
|
| 289 | 286 | drupal_add_js($editor['library path'] . '/' . $options); |
| 290 | 287 | } |
| 291 | 288 | } |
@@ -322,8 +319,7 @@ discard block |
||
| 322 | 319 | )), 'setting'); |
| 323 | 320 | |
| 324 | 321 | $loaded[$name] = TRUE; |
| 325 | - } |
|
| 326 | - else { |
|
| 322 | + } else { |
|
| 327 | 323 | $loaded[$name] = FALSE; |
| 328 | 324 | } |
| 329 | 325 | } |
@@ -468,8 +464,7 @@ discard block |
||
| 468 | 464 | if (isset($meta['settings'])) { |
| 469 | 465 | drupal_add_js(array('wysiwyg' => array('plugins' => array('drupal' => array($plugin => $meta['settings'])))), 'setting'); |
| 470 | 466 | } |
| 471 | - } |
|
| 472 | - else { |
|
| 467 | + } else { |
|
| 473 | 468 | $profile_plugins_drupal[$plugin] = $processed_plugins[$proxy][$plugin]; |
| 474 | 469 | } |
| 475 | 470 | } |
@@ -711,8 +706,7 @@ discard block |
||
| 711 | 706 | ); |
| 712 | 707 | return $form; |
| 713 | 708 | } |
| 714 | - } |
|
| 715 | - elseif ($op == 'insert' || $op == 'update') { |
|
| 709 | + } elseif ($op == 'insert' || $op == 'update') { |
|
| 716 | 710 | if (isset($edit['wysiwyg_status'])) { |
| 717 | 711 | db_query("DELETE FROM {wysiwyg_user} WHERE uid = %d", $account->uid); |
| 718 | 712 | foreach ($edit['wysiwyg_status'] as $format => $status) { |
@@ -745,8 +739,7 @@ discard block |
||
| 745 | 739 | |
| 746 | 740 | if (!empty($profile->settings['user_choose']) && isset($account->wysiwyg_status[$profile->format])) { |
| 747 | 741 | $status = $account->wysiwyg_status[$profile->format]; |
| 748 | - } |
|
| 749 | - else { |
|
| 742 | + } else { |
|
| 750 | 743 | $status = isset($profile->settings['default']) ? $profile->settings['default'] : TRUE; |
| 751 | 744 | } |
| 752 | 745 | |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | $links['mark-read']['href'] = "community/forum/{$tid}/read"; |
| 20 | 20 | |
| 21 | 21 | return l(t('Mark all topics read') . '<span class="image-replace"></span>', "forum/markasread/$tid", array('html' => TRUE)); |
| 22 | - } |
|
| 23 | - else { |
|
| 22 | + } else { |
|
| 24 | 23 | $links['mark-read']['title'] = t('Mark all forums read'); |
| 25 | 24 | $links['mark-read']['href'] = "community/forum/0/read"; |
| 26 | 25 | |
@@ -117,8 +117,7 @@ discard block |
||
| 117 | 117 | $field['widget']['type'] = $field['widget_type']; |
| 118 | 118 | $widget_types = _content_widget_types(); |
| 119 | 119 | $field['widget']['module'] = isset($widget_types[$field['widget_type']]['module']) ? $widget_types[$field['widget_type']]['module'] : $field['widget_module']; |
| 120 | - } |
|
| 121 | - elseif (!empty($field['widget_module'])) { |
|
| 120 | + } elseif (!empty($field['widget_module'])) { |
|
| 122 | 121 | $field['widget']['module'] = $field['widget_module']; |
| 123 | 122 | } |
| 124 | 123 | |
@@ -157,12 +156,10 @@ discard block |
||
| 157 | 156 | |
| 158 | 157 | if (!empty($field['widget']['module'])) { |
| 159 | 158 | $widget_module = $field['widget']['module']; |
| 160 | - } |
|
| 161 | - elseif (!empty($field['widget']['type'])) { |
|
| 159 | + } elseif (!empty($field['widget']['type'])) { |
|
| 162 | 160 | $widget_types = _content_widget_types(); |
| 163 | 161 | $widget_module = $widget_types[$field['widget']['type']]['module']; |
| 164 | - } |
|
| 165 | - else { |
|
| 162 | + } else { |
|
| 166 | 163 | $widget_module = ''; |
| 167 | 164 | } |
| 168 | 165 | $field['widget_module'] = $widget_module; |
@@ -226,8 +223,7 @@ discard block |
||
| 226 | 223 | $field['widget']['weight'] = isset($form_values['weight']) ? $form_values['weight'] : $prev_field['widget']['weight']; |
| 227 | 224 | $field['widget']['label'] = isset($form_values['label']) ? $form_values['label'] : $prev_field['widget']['label']; |
| 228 | 225 | $field['widget']['description'] = isset($form_values['description']) ? $form_values['description'] : $prev_field['widget']['description']; |
| 229 | - } |
|
| 230 | - else { |
|
| 226 | + } else { |
|
| 231 | 227 | $prev_field = array('widget' => array()); |
| 232 | 228 | } |
| 233 | 229 | |
@@ -261,8 +257,7 @@ discard block |
||
| 261 | 257 | // If this is the first instance, create the field. |
| 262 | 258 | $field['db_storage'] = $field['multiple'] > 0 ? CONTENT_DB_STORAGE_PER_FIELD : CONTENT_DB_STORAGE_PER_CONTENT_TYPE; |
| 263 | 259 | _content_field_write($field, 'create'); |
| 264 | - } |
|
| 265 | - elseif (!empty($prev_field['widget']) && $prev_field['db_storage'] == CONTENT_DB_STORAGE_PER_CONTENT_TYPE && count($prior_instances) > 0) { |
|
| 260 | + } elseif (!empty($prev_field['widget']) && $prev_field['db_storage'] == CONTENT_DB_STORAGE_PER_CONTENT_TYPE && count($prior_instances) > 0) { |
|
| 266 | 261 | // If the database storage has changed, update the field and previous instances. |
| 267 | 262 | $field['db_storage'] = CONTENT_DB_STORAGE_PER_FIELD; |
| 268 | 263 | |
@@ -45,8 +45,7 @@ |
||
| 45 | 45 | $view->display[$display]->display_options['fields'][$views_field['field']]['format'] = $views_field['options']; |
| 46 | 46 | if ($views_field['handler'] == 'content_views_field_handler_group') { |
| 47 | 47 | $view->display[$display]->display_options['fields'][$views_field['field']]['multiple']['group'] = 1; |
| 48 | - } |
|
| 49 | - else { |
|
| 48 | + } else { |
|
| 50 | 49 | $view->display[$display]->display_options['fields'][$views_field['field']]['multiple']['group'] = 0; |
| 51 | 50 | } |
| 52 | 51 | return; |
@@ -252,8 +252,7 @@ |
||
| 252 | 252 | if ($db_fields_count == 1) { |
| 253 | 253 | $title = t('@label (!name)', array('@label' => t($field['widget']['label']), '!name' => $field['field_name'])); |
| 254 | 254 | $title_short = check_plain($label_truncated); |
| 255 | - } |
|
| 256 | - else { |
|
| 255 | + } else { |
|
| 257 | 256 | $title = t('@label (!name) - !column', array('@label' => t($field['widget']['label']), '!name' => $field['field_name'], '!column' => $columns[$i])); |
| 258 | 257 | $title_short = t('@label-truncated - !column', array('@label-truncated' => $label_truncated, '!column' => $columns[$i])); |
| 259 | 258 | } |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | // For selects, HTML should be filtered out and entities left unencoded. |
| 33 | 33 | // See content_allowed_values / content_filter_xss / filter_xss. |
| 34 | 34 | content_allowed_values_filter_html($options); |
| 35 | - } |
|
| 36 | - else { |
|
| 35 | + } else { |
|
| 37 | 36 | $options = function_exists($function) ? $function($field) : content_allowed_values($field); |
| 38 | 37 | } |
| 39 | 38 | return (array) $options; |
@@ -20,8 +20,7 @@ |
||
| 20 | 20 | $value = $data->{$this->name_alias}; |
| 21 | 21 | if (isset($options[$value])) { |
| 22 | 22 | $value = $options[$value]; |
| 23 | - } |
|
| 24 | - else { |
|
| 23 | + } else { |
|
| 25 | 24 | $value = parent::summary_name($data); |
| 26 | 25 | } |
| 27 | 26 | |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | ); |
| 30 | 30 | if ($view->base_table == 'node_revisions') { |
| 31 | 31 | $this->additional_fields['vid'] = array('table' => 'node_revisions', 'field' => 'vid'); |
| 32 | - } |
|
| 33 | - else { |
|
| 32 | + } else { |
|
| 34 | 33 | $this->additional_fields['vid'] = array('table' => 'node', 'field' => 'vid'); |
| 35 | 34 | } |
| 36 | 35 | } |
@@ -245,8 +244,7 @@ discard block |
||
| 245 | 244 | $nid = $item['_nid']; |
| 246 | 245 | unset($item['_nid']); |
| 247 | 246 | $items[] = $item; |
| 248 | - } |
|
| 249 | - else { |
|
| 247 | + } else { |
|
| 250 | 248 | break; |
| 251 | 249 | } |
| 252 | 250 | } |
@@ -276,8 +274,7 @@ discard block |
||
| 276 | 274 | $rendered[] = $this->render_link($output, (object) array('nid' => $nid)); |
| 277 | 275 | } |
| 278 | 276 | } |
| 279 | - } |
|
| 280 | - else { |
|
| 277 | + } else { |
|
| 281 | 278 | // Multiple values formatter. |
| 282 | 279 | $output = content_format($field, $items, $formatter_name, $values); |
| 283 | 280 | if (!empty($output)) { |
@@ -288,8 +285,7 @@ discard block |
||
| 288 | 285 | if (count($rendered) > 1) { |
| 289 | 286 | // TODO: could we use generic field display ? |
| 290 | 287 | return theme('content_view_multiple_field', $rendered, $field, $values); |
| 291 | - } |
|
| 292 | - elseif ($rendered) { |
|
| 288 | + } elseif ($rendered) { |
|
| 293 | 289 | return $rendered[0]; |
| 294 | 290 | } |
| 295 | 291 | } |
@@ -308,13 +304,11 @@ discard block |
||
| 308 | 304 | // Views 2.3+ |
| 309 | 305 | $this->options['alter']['make_link'] = TRUE; |
| 310 | 306 | $this->options['alter']['path'] = "node/" . $values->{$this->aliases['nid']}; |
| 311 | - } |
|
| 312 | - else { |
|
| 307 | + } else { |
|
| 313 | 308 | // Views up to 2.2 |
| 314 | 309 | return l($data, "node/" . $values->nid, array('html' => TRUE)); |
| 315 | 310 | } |
| 316 | - } |
|
| 317 | - else { |
|
| 311 | + } else { |
|
| 318 | 312 | return $data; |
| 319 | 313 | } |
| 320 | 314 | } |