Passed
Pull Request — master (#2712)
by Christian
13:50 queued 06:33
created
boinc/modules/contrib/views/handlers/views_handler_argument_numeric.inc 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     if (!empty($this->options['break_phrase'])) {
48 48
       views_break_phrase($this->argument, $this);
49
-    }
50
-    else {
49
+    } else {
51 50
       $this->value = array($this->argument);
52 51
       $this->operator = 'or';
53 52
     }
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
 
76 75
     if (!empty($this->options['break_phrase'])) {
77 76
       views_break_phrase($this->argument, $this);
78
-    }
79
-    else {
77
+    } else {
80 78
       $this->value = array($this->argument);
81 79
     }
82 80
 
@@ -86,8 +84,7 @@  discard block
 block discarded – undo
86 84
       $operator = empty($this->options['not']) ? 'IN' : 'NOT IN';
87 85
       $placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
88 86
       $this->query->add_where(0, "$this->table_alias.$this->real_field $operator ($placeholders) $null_check", $this->value);
89
-    }
90
-    else {
87
+    } else {
91 88
       $operator = empty($this->options['not']) ? '=' : '!=';
92 89
       $this->query->add_where(0, "$this->table_alias.$this->real_field $operator %d $null_check", $this->argument);
93 90
     }
Please login to merge, or discard this patch.
boinc/modules/contrib/views/handlers/views_handler_filter_in_operator.inc 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     if (isset($this->definition['options callback']) && is_callable($this->definition['options callback'])) {
32 32
       $this->value_options = call_user_func($this->definition['options callback']);
33
-    }
34
-    else {
33
+    } else {
35 34
       $this->value_options = array(t('Yes'), t('No'));
36 35
     }
37 36
   }
@@ -143,8 +142,7 @@  discard block
 block discarded – undo
143 142
       if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator'])) {
144 143
         // exposed and locked.
145 144
         $which = in_array($this->operator, $this->operator_values(1)) ? 'value' : 'none';
146
-      }
147
-      else {
145
+      } else {
148 146
         $source = 'edit-' . form_clean_id($this->options['expose']['operator']);
149 147
       }
150 148
 
@@ -159,12 +157,10 @@  discard block
 block discarded – undo
159 157
       if (!empty($this->options['expose']['single'])) {
160 158
         if (!empty($this->options['expose']['optional']) && (empty($default_value) || !empty($this->options['expose']['reduce']))) {
161 159
           $default_value = 'All';
162
-        }
163
-        else if (empty($default_value)) {
160
+        } else if (empty($default_value)) {
164 161
           $keys = array_keys($options);
165 162
           $default_value = array_shift($keys);
166
-        }
167
-        else {
163
+        } else {
168 164
           $copy = $default_value;
169 165
           $default_value = array_shift($copy);
170 166
         }
@@ -226,15 +222,13 @@  discard block
 block discarded – undo
226 222
       if (is_array($option)) {
227 223
         $options[$id] = $this->reduce_value_options($option);
228 224
         continue;
229
-      }
230
-      else if (is_object($option)) {
225
+      } else if (is_object($option)) {
231 226
         $keys = array_keys($option->option);
232 227
         $key = array_shift($keys);
233 228
         if (isset($this->options['value'][$key])) {
234 229
           $options[$id] = $option;
235 230
         }
236
-      }
237
-      else if (isset($this->options['value'][$id])) {
231
+      } else if (isset($this->options['value'][$id])) {
238 232
         $options[$id] = $option;
239 233
       }
240 234
     }
@@ -298,8 +292,7 @@  discard block
 block discarded – undo
298 292
       // Choose different kind of ouput for 0, a single and multiple values.
299 293
       if (count($this->value) == 0) {
300 294
         $values = t('Unknown');
301
-      }
302
-      else if (count($this->value) == 1) {
295
+      } else if (count($this->value) == 1) {
303 296
         // If any, use the 'single' short name of the operator instead.
304 297
         if (isset($info[$this->operator]['short_single'])) {
305 298
           $operator = check_plain($info[$this->operator]['short_single']);
@@ -308,8 +301,7 @@  discard block
 block discarded – undo
308 301
         $keys = $this->value;
309 302
         $value = array_shift($keys);
310 303
         $values = check_plain($this->value_options[$value]);
311
-      }
312
-      else {
304
+      } else {
313 305
         foreach ($this->value as $value) {
314 306
           if ($values !== '') {
315 307
             $values .= ', ';
@@ -354,8 +346,7 @@  discard block
 block discarded – undo
354 346
 
355 347
     if ($this->operator == 'empty') {
356 348
       $operator = "IS NULL";
357
-    }
358
-    else {
349
+    } else {
359 350
       $operator = "IS NOT NULL";
360 351
     }
361 352
 
Please login to merge, or discard this patch.
default/boinc/modules/contrib/views/handlers/views_handler_filter_float.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
     if ($this->operator == 'between') {
11 11
       $this->query->add_where($this->options['group'], "$field >= %f", $this->value['min']);
12 12
       $this->query->add_where($this->options['group'], "$field <= %f", $this->value['max']);
13
-    }
14
-    else {
13
+    } else {
15 14
       $this->query->add_where($this->options['group'], "$field <= %f OR $field >= %f", $this->value['min'], $this->value['max']);
16 15
     }
17 16
   }
Please login to merge, or discard this patch.
boinc/modules/contrib/views/handlers/views_handler_filter_numeric.inc 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -135,8 +135,7 @@  discard block
 block discarded – undo
135 135
       if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator'])) {
136 136
         // exposed and locked.
137 137
         $which = in_array($this->operator, $this->operator_values(2)) ? 'minmax' : 'value';
138
-      }
139
-      else {
138
+      } else {
140 139
         $source = 'edit-' . form_clean_id($this->options['expose']['operator']);
141 140
       }
142 141
     }
@@ -153,8 +152,7 @@  discard block
 block discarded – undo
153 152
       if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier]['value'])) {
154 153
         $form_state['input'][$identifier]['value'] = $this->value['value'];
155 154
       }
156
-    }
157
-    else if ($which == 'value') {
155
+    } else if ($which == 'value') {
158 156
       // When exposed we drop the value-value and just do value if
159 157
       // the operator is locked.
160 158
       $form['value'] = array(
@@ -220,8 +218,7 @@  discard block
 block discarded – undo
220 218
     if ($this->operator == 'between') {
221 219
       $this->query->add_where($this->options['group'], "$field >= %d", $this->value['min']);
222 220
       $this->query->add_where($this->options['group'], "$field <= %d", $this->value['max']);
223
-    }
224
-    else {
221
+    } else {
225 222
       $this->query->add_where($this->options['group'], "$field <= %d OR $field >= %d", $this->value['min'], $this->value['max']);
226 223
     }
227 224
   }
@@ -233,8 +230,7 @@  discard block
 block discarded – undo
233 230
   function op_empty($field) {
234 231
     if ($this->operator == 'empty') {
235 232
       $operator = "IS NULL";
236
-    }
237
-    else {
233
+    } else {
238 234
       $operator = "IS NOT NULL";
239 235
     }
240 236
 
@@ -250,8 +246,7 @@  discard block
 block discarded – undo
250 246
     $output = check_plain($options[$this->operator]);
251 247
     if (in_array($this->operator, $this->operator_values(2))) {
252 248
       $output .= ' ' . t('@min and @max', array('@min' => $this->value['min'], '@max' => $this->value['max']));
253
-    }
254
-    elseif (in_array($this->operator, $this->operator_values(1))) {
249
+    } elseif (in_array($this->operator, $this->operator_values(1))) {
255 250
       $output .= ' ' . check_plain($this->value['value']);
256 251
     }
257 252
     return $output;
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/views/handlers/views_handler_filter.inc 1 patch
Braces   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -215,8 +215,7 @@  discard block
 block discarded – undo
215 215
         '#value' => t('This item is currently not exposed. If you <strong>expose</strong> it, users will be able to change the filter as they view it.'),
216 216
         '#suffix' => '</div>',
217 217
       );
218
-    }
219
-    else {
218
+    } else {
220 219
       $form['expose_button']['button'] = array(
221 220
         '#type' => 'submit',
222 221
         '#value' => t('Hide'),
@@ -310,8 +309,7 @@  discard block
 block discarded – undo
310 309
           'edit-options-expose-use-operator' => array(1)
311 310
         ),
312 311
       );
313
-    }
314
-    else {
312
+    } else {
315 313
       $form['expose']['operator'] = array(
316 314
         '#type' => 'value',
317 315
         '#value' => '',
@@ -540,8 +538,7 @@  discard block
 block discarded – undo
540 538
         if (empty($this->no_single) && !empty($this->options['expose']['single'])) {
541 539
           $this->value = array($value);
542 540
         }
543
-      }
544
-      else {
541
+      } else {
545 542
         return FALSE;
546 543
       }
547 544
     }
@@ -615,8 +612,10 @@  discard block
 block discarded – undo
615 612
     return t('Broken/missing handler');
616 613
   }
617 614
 
618
-  function ensure_my_table() { /* No table to ensure! */ }
619
-  function query() { /* No query to run */ }
615
+  function ensure_my_table() {
616
+/* No table to ensure! */ }
617
+  function query() {
618
+/* No query to run */ }
620 619
   function options_form(&$form, &$form_state) {
621 620
     $form['markup'] = array(
622 621
       '#prefix' => '<div class="form-item description">',
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/views/includes/analyze.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
     $message = '';
51 51
     if (count($messages) > 1) {
52 52
       $message = theme('item_list', $messages);
53
-    }
54
-    else if ($messages) {
53
+    } else if ($messages) {
55 54
       $message = array_shift($messages);
56 55
     }
57 56
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/views/includes/admin.inc 1 patch
Braces   +38 added lines, -76 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@  discard block
 block discarded – undo
33 33
     $filename = db_result(db_query("SELECT filename FROM {system} WHERE type = 'module' AND name = 'advanced_help'"));
34 34
     if ($filename && file_exists($filename)) {
35 35
       drupal_set_message(t('If you <a href="@modules">enable the advanced help module</a>, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array('@modules' => url('admin/build/modules'),'@hide' => url('admin/build/views/tools'))));
36
-    }
37
-    else {
36
+    } else {
38 37
       drupal_set_message(t('If you install the advanced help module from !href, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array('!href' => l('http://drupal.org/project/advanced_help', 'http://drupal.org/project/advanced_help'), '@hide' => url('admin/build/views/tools'))));
39 38
     }
40 39
   }
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
     if (isset($_SESSION['views']['#admin']) && is_array($_SESSION['views']['#admin'])) {
66 65
       $_GET += $_SESSION['views']['#admin'];
67 66
     }
68
-  }
69
-  else {
67
+  } else {
70 68
     $_SESSION['views']['#admin'] = $_GET;
71 69
     unset($_SESSION['views']['#admin']['q']);
72 70
   }
@@ -91,8 +89,7 @@  discard block
 block discarded – undo
91 89
         if (!empty($view->tag)) {
92 90
           continue;
93 91
         }
94
-      }
95
-      else if ($form_state['values']['tag'] != $view->tag) {
92
+      } else if ($form_state['values']['tag'] != $view->tag) {
96 93
         continue;
97 94
       }
98 95
     }
@@ -118,12 +115,10 @@  discard block
 block discarded – undo
118 115
     if ($view->type != t('Default')) {
119 116
       $text = $view->type == t('Overridden') ? t('Revert') : t('Delete');
120 117
       $item->ops[] = l($text, "admin/build/views/delete/$view->name");
121
-    }
122
-    else {
118
+    } else {
123 119
       if (empty($view->disabled)) {
124 120
         $item->ops[] = l(t('Disable'), "admin/build/views/disable/$view->name", array('query' => drupal_get_destination() . '&token=' . $token_disable));
125
-      }
126
-      else {
121
+      } else {
127 122
         $item->ops[] = l(t('Enable'), "admin/build/views/enable/$view->name", array('query' => drupal_get_destination() . '&token=' . $token_enable));
128 123
       }
129 124
     }
@@ -131,8 +126,7 @@  discard block
 block discarded – undo
131 126
     $item->ops = implode(' | ', $item->ops);
132 127
     if (empty($view->display)) {
133 128
       $item->path = t('Warning! Broken view!');
134
-    }
135
-    else {
129
+    } else {
136 130
       $item->path = $raw_path = $view->get_path();
137 131
       $item->path = $item->path && empty($view->disabled) && strpos($item->path, '%') === FALSE ? l($item->path, $item->path) : check_plain($item->path);
138 132
     }
@@ -192,8 +186,7 @@  discard block
 block discarded – undo
192 186
 
193 187
   if ($form_state['values']['sort'] == 'desc') {
194 188
     arsort($sorts);
195
-  }
196
-  else {
189
+  } else {
197 190
     asort($sorts);
198 191
   }
199 192
 
@@ -412,8 +405,7 @@  discard block
 block discarded – undo
412 405
       $rows[] = array('<strong>' . t('Title') . '</strong>', filter_xss_admin($view->get_title()));
413 406
       if (isset($path)) {
414 407
         $path = l($path, $path);
415
-      }
416
-      else {
408
+      } else {
417 409
         $path = t('This display has no path.');
418 410
       }
419 411
 
@@ -425,12 +417,10 @@  discard block
 block discarded – undo
425 417
       drupal_alter('views_preview_info', $rows, $view);
426 418
 
427 419
       $info = theme('table', array(), $rows);
428
-    }
429
-    else {
420
+    } else {
430 421
       $info = theme('table', array(), array(array('<strong>' . t('Query') . '</strong>', t('No query was run'))));
431 422
     }
432
-  }
433
-  else {
423
+  } else {
434 424
     foreach ($errors as $error) {
435 425
       drupal_set_message($error, 'error');
436 426
     }
@@ -442,8 +432,7 @@  discard block
 block discarded – undo
442 432
 
443 433
   if (variable_get('views_ui_query_on_top', FALSE)) {
444 434
     $output .= $info . $preview;
445
-  }
446
-  else {
435
+  } else {
447 436
     $output .= $preview . $info;
448 437
   }
449 438
 
@@ -451,8 +440,7 @@  discard block
 block discarded – undo
451 440
     views_add_css('views-admin');
452 441
     drupal_set_title($view->get_title());
453 442
     return $output;
454
-  }
455
-  else {
443
+  } else {
456 444
     views_include('ajax');
457 445
     $object = new stdClass();
458 446
     if (!empty($view->js_settings)) {
@@ -661,8 +649,7 @@  discard block
 block discarded – undo
661 649
     $title = t('Are you sure you want to revert the view %name?', array('%name' => $view->name));
662 650
     $desc = t('Reverting the view will delete the view that is in the database, reverting it to the original default view. Any changes you have made will be lost and cannot be recovered.');
663 651
     $button = t('Revert');
664
-  }
665
-  else {
652
+  } else {
666 653
     $title = t('Are you sure you want to delete the view %name?', array('%name' => $view->name));
667 654
     $desc = t('Deleting a view cannot be undone.');
668 655
     $button = t('Delete');
@@ -792,12 +779,10 @@  discard block
 block discarded – undo
792 779
       views_include('convert');
793 780
       $view = views1_import($view);
794 781
       drupal_set_message(t('You are importing a view created in Views version 1. You may need to adjust some parameters to work correctly in version 2.'), 'warning');
795
-    }
796
-    else {
782
+    } else {
797 783
       form_error($form['view'], t('That view is not compatible with this version of Views.'));
798 784
     }
799
-  }
800
-  elseif ($view->api_version > views_api_version()) {
785
+  } elseif ($view->api_version > views_api_version()) {
801 786
     form_error($form['view'], t('That view is created for the version @import_version of views, but you only have @api_version', array(
802 787
       '@import_version' => $view->api_version,
803 788
       '@api_version' => views_api_version())));
@@ -832,8 +817,7 @@  discard block
 block discarded – undo
832 817
     if (!$plugin) {
833 818
       drupal_set_message(t('Style plugin @plugin is not available.', array('@plugin' => $display->handler->get_option('style_plugin'))), 'error');
834 819
       $broken = TRUE;
835
-    }
836
-    else if ($plugin->uses_row_plugin()) {
820
+    } else if ($plugin->uses_row_plugin()) {
837 821
       $plugin = views_get_plugin('row', $display->handler->get_option('row_plugin'));
838 822
       if (!$plugin) {
839 823
         drupal_set_message(t('Row plugin @plugin is not available.', array('@plugin' => $display->handler->get_option('row_plugin'))), 'error');
@@ -1144,8 +1128,7 @@  discard block
 block discarded – undo
1144 1128
     if (!empty($display->handler->options['defaults'][$id])) {
1145 1129
       $display_id = 'default';
1146 1130
       $data['defaulted'] = TRUE;
1147
-    }
1148
-    else {
1131
+    } else {
1149 1132
       $display_id = $display->id;
1150 1133
       if (!$display->handler->is_default_display()) {
1151 1134
         if ($display->handler->defaultable_sections($id)) {
@@ -1164,8 +1147,7 @@  discard block
 block discarded – undo
1164 1147
   // Add a help icon
1165 1148
   if (isset($plugin['help topic'])) {
1166 1149
     $vars['display_help_icon'] = theme('advanced_help_topic', $plugin['module'], $plugin['help topic']);
1167
-  }
1168
-  else {
1150
+  } else {
1169 1151
     $vars['display_help_icon'] = '';
1170 1152
   }
1171 1153
 
@@ -1231,16 +1213,14 @@  discard block
 block discarded – undo
1231 1213
   if (!$display->handler->is_default_display()) {
1232 1214
     if (!$display->handler->is_defaulted($types[$type]['plural'])) {
1233 1215
       $vars['overridden'] = TRUE;
1234
-    }
1235
-    else {
1216
+    } else {
1236 1217
       $vars['defaulted'] = TRUE;
1237 1218
     }
1238 1219
   }
1239 1220
 
1240 1221
   if ($display->display_plugin != 'default') {
1241 1222
     $vars['title'] = l($types[$type]['title'], "admin/build/views/nojs/config-type/$view->name/$display->id/$type", array('attributes' => array('class' => 'views-ajax-link')));
1242
-  }
1243
-  else {
1223
+  } else {
1244 1224
     $vars['title'] = $types[$type]['title'];
1245 1225
   }
1246 1226
 
@@ -1322,14 +1302,12 @@  discard block
 block discarded – undo
1322 1302
 function views_ui_regenerate_tabs(&$view, $display_id = NULL, $object = NULL) {
1323 1303
   if (empty($display_id)) {
1324 1304
     $displays = array_keys($view->display);
1325
-  }
1326
-  elseif (!is_array($display_id)) {
1305
+  } elseif (!is_array($display_id)) {
1327 1306
     $displays = array($display_id);
1328 1307
     if ($display_id != 'default') {
1329 1308
       $displays[] = 'default';
1330 1309
     }
1331
-  }
1332
-  else {
1310
+  } else {
1333 1311
     $displays = $display_id;
1334 1312
   }
1335 1313
 
@@ -1431,8 +1409,7 @@  discard block
 block discarded – undo
1431 1409
   if (isset($form['#js'])) {
1432 1410
     if (!empty($form_state['js settings']) && is_array($form_state['js settings'])) {
1433 1411
       $form_state['js settings'] = array_merge($form_state['js settings'], $form['#js']);
1434
-    }
1435
-    else {
1412
+    } else {
1436 1413
       $form_state['js settings'] = $form['#js'];
1437 1414
     }
1438 1415
   }
@@ -1581,8 +1558,7 @@  discard block
 block discarded – undo
1581 1558
   $stack = array(views_ui_build_identifier($key, $view, $display_id, $args), $key, &$view, $display_id, $args);
1582 1559
   if ($top) {
1583 1560
     array_unshift($view->stack, $stack);
1584
-  }
1585
-  else {
1561
+  } else {
1586 1562
     $view->stack[] = $stack;
1587 1563
   }
1588 1564
 }
@@ -1637,8 +1613,7 @@  discard block
 block discarded – undo
1637 1613
       }
1638 1614
       $object = views_ajax_form_wrapper($form_state['form_id'], $form_state);
1639 1615
       $object->url = url(views_ui_build_form_url($form_state));
1640
-    }
1641
-    else if (!$js) {
1616
+    } else if (!$js) {
1642 1617
       // if nothing on the stack, non-js forms just go back to the main view editor.
1643 1618
       return drupal_goto("admin/build/views/edit/$view->name");
1644 1619
     }
@@ -1823,8 +1798,7 @@  discard block
 block discarded – undo
1823 1798
       '#value' => t('Remove display'),
1824 1799
       '#submit' => array('views_ui_remove_display_form_submit'),
1825 1800
     );
1826
-  }
1827
-  else {
1801
+  } else {
1828 1802
     $form['display'] = array(
1829 1803
       '#prefix' => '<div class="display-button restore-display">',
1830 1804
       '#suffix' => '</div>',
@@ -2183,8 +2157,7 @@  discard block
 block discarded – undo
2183 2157
       $form['fields'][$id]['name'] = array(
2184 2158
         '#value' => $name,
2185 2159
       );
2186
-    }
2187
-    else {
2160
+    } else {
2188 2161
       $form['fields'][$id]['name'] = array('#value' => t('Broken field @id', array('@id' => $id)));
2189 2162
     }
2190 2163
     $form['fields'][$id]['removed'] = array(
@@ -2336,8 +2309,7 @@  discard block
 block discarded – undo
2336 2309
     }
2337 2310
 
2338 2311
     $form['group']['#options'] = $groups;
2339
-  }
2340
-  else {
2312
+  } else {
2341 2313
     $form['markup'] = array(
2342 2314
       '#value' => '<div class="form-item">' . t('There are no @types available to add.', array('@types' =>  $types[$type]['ltitle'])) . '</div>',
2343 2315
     );
@@ -2394,8 +2366,7 @@  discard block
 block discarded – undo
2394 2366
     $handler = views_get_handler($item['table'], $item['field'], $type);
2395 2367
     if (empty($handler)) {
2396 2368
       $form['markup'] = array('#value' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
2397
-    }
2398
-    else {
2369
+    } else {
2399 2370
       $handler->init($view, $item);
2400 2371
       $types = views_object_types();
2401 2372
 
@@ -2455,8 +2426,7 @@  discard block
 block discarded – undo
2455 2426
           '#options' => $relationship_options,
2456 2427
           '#default_value' => $rel,
2457 2428
         );
2458
-      }
2459
-      else {
2429
+      } else {
2460 2430
         $form['options']['relationship'] = array(
2461 2431
           '#type' => 'value',
2462 2432
           '#value' => 'none',
@@ -2578,8 +2548,7 @@  discard block
 block discarded – undo
2578 2548
     $handler = views_get_handler($item['table'], $item['field'], $type);
2579 2549
     if (empty($handler)) {
2580 2550
       $form['markup'] = array('#value' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
2581
-    }
2582
-    else {
2551
+    } else {
2583 2552
       $handler->init($view, $item);
2584 2553
       $types = views_object_types();
2585 2554
 
@@ -2645,8 +2614,7 @@  discard block
 block discarded – undo
2645 2614
     $handler = views_get_handler($item['table'], $item['field'], $type);
2646 2615
     if (empty($handler)) {
2647 2616
       $form['markup'] = array('#value' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
2648
-    }
2649
-    else {
2617
+    } else {
2650 2618
       $handler->init($view, $item);
2651 2619
       $types = views_object_types();
2652 2620
       $form['#title'] = t('Change summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name()));
@@ -2730,8 +2698,7 @@  discard block
 block discarded – undo
2730 2698
     $handler = views_get_handler($item['table'], $item['field'], $type);
2731 2699
     if (empty($handler)) {
2732 2700
       $form['markup'] = array('#value' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
2733
-    }
2734
-    else {
2701
+    } else {
2735 2702
       $handler->init($view, $item);
2736 2703
       $types = views_object_types();
2737 2704
 
@@ -2809,8 +2776,7 @@  discard block
 block discarded – undo
2809 2776
     views_invalidate_cache();
2810 2777
     menu_rebuild();
2811 2778
     drupal_goto('admin/build/views');
2812
-  }
2813
-  else {
2779
+  } else {
2814 2780
     return drupal_access_denied();
2815 2781
   }
2816 2782
 }
@@ -2826,8 +2792,7 @@  discard block
 block discarded – undo
2826 2792
     views_invalidate_cache();
2827 2793
     menu_rebuild();
2828 2794
     drupal_goto('admin/build/views');
2829
-  }
2830
-  else {
2795
+  } else {
2831 2796
     return drupal_access_denied();
2832 2797
   }
2833 2798
 }
@@ -3085,8 +3050,7 @@  discard block
 block discarded – undo
3085 3050
               foreach ((array) $info[$key]['skip base'] as $base_name) {
3086 3051
                 $skip_bases[$field][$key][$base_name] = TRUE;
3087 3052
               }
3088
-            }
3089
-            elseif (!empty($info['skip base'])) {
3053
+            } elseif (!empty($info['skip base'])) {
3090 3054
               foreach ((array) $info['skip base'] as $base_name) {
3091 3055
                 $skip_bases[$field][$key][$base_name] = TRUE;
3092 3056
               }
@@ -3103,8 +3067,7 @@  discard block
 block discarded – undo
3103 3067
               // Finally, try the table level
3104 3068
               elseif (!empty($table_data['table'][$string])) {
3105 3069
                 $strings[$field][$key][$string] = $table_data['table'][$string];
3106
-              }
3107
-              else {
3070
+              } else {
3108 3071
                 if ($string != 'base') {
3109 3072
                   $strings[$field][$key][$string] = t("Error: missing @component", array('@component' => $string));
3110 3073
                 }
@@ -3219,8 +3182,7 @@  discard block
 block discarded – undo
3219 3182
         'data' => drupal_render($form['default'][$id]),
3220 3183
         'align' => 'center',
3221 3184
       );
3222
-    }
3223
-    else {
3185
+    } else {
3224 3186
       $row[] = '';
3225 3187
       $row[] = '';
3226 3188
     }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/views/includes/tabs.inc 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,13 +35,11 @@  discard block
 block discarded – undo
35 35
   function add($name, $title = '', $body = '') {
36 36
     if (is_object($name) && is_subclass_of($name, 'views_tab')) {
37 37
       $this->add_tab($name);
38
-    }
39
-    elseif (is_array($name)) {
38
+    } elseif (is_array($name)) {
40 39
       foreach ($name as $real_tab) {
41 40
         $this->add($real_tab);
42 41
       }
43
-    }
44
-    else {
42
+    } else {
45 43
       $this->add_tab(new views_tab($name, $title, $body));
46 44
     }
47 45
   }
@@ -102,8 +100,7 @@  discard block
 block discarded – undo
102 100
   function remove($tab) {
103 101
     if (is_string($tab)) {
104 102
       unset($this->tabs[$tab]);
105
-    }
106
-    else {
103
+    } else {
107 104
       unset($this->tabs[$tab->name]);
108 105
     }
109 106
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/views/includes/ajax.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@
 block discarded – undo
81 81
   if (empty($output)) {
82 82
     $output->display = t('Server reports invalid input error.');
83 83
     $output->title = t('Error');
84
-  }
85
-  elseif (!is_object($output)) {
84
+  } elseif (!is_object($output)) {
86 85
     $temp = new stdClass();
87 86
     $temp->display = $output;
88 87
     $temp->title = $title;
Please login to merge, or discard this patch.