Completed
Pull Request — master (#1976)
by Christian
10:47
created
drupal/sites/default/boinc/modules/contrib/cck/modules/text/text.module 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -95,8 +95,7 @@  discard block
 block discarded – undo
95 95
           '#rows' => 6,
96 96
           '#description' => t('Advanced usage only: PHP code that returns a keyed array of allowed values. Should not include <?php ?> delimiters. If this field is filled out, the array returned by this code will override the allowed values list above.'),
97 97
         );
98
-      }
99
-      else {
98
+      } else {
100 99
         $form['allowed_values_fieldset']['advanced_options']['markup_allowed_values_php'] = array(
101 100
           '#type' => 'item',
102 101
           '#title' => t('Code'),
@@ -112,8 +111,7 @@  discard block
 block discarded – undo
112 111
     case 'database columns':
113 112
       if (empty($field['max_length']) || $field['max_length'] > 255) {
114 113
         $columns['value'] = array('type' => 'text', 'size' => 'big', 'not null' => FALSE, 'sortable' => TRUE, 'views' => TRUE);
115
-      }
116
-      else {
114
+      } else {
117 115
         $columns['value'] = array('type' => 'varchar', 'length' => $field['max_length'], 'not null' => FALSE, 'sortable' => TRUE, 'views' => TRUE);
118 116
       }
119 117
       if (!empty($field['text_processing'])) {
@@ -168,8 +166,7 @@  discard block
 block discarded – undo
168 166
       foreach ($items as $delta => $item) {
169 167
         if (!empty($field['text_processing'])) {
170 168
           $text = isset($item['value']) ? check_markup($item['value'], $item['format'], FALSE) : '';
171
-        }
172
-        else {
169
+        } else {
173 170
           $text = isset($item['value']) ? check_plain($item['value']) : '';
174 171
         }
175 172
         $items[$delta]['safe'] = $text;
@@ -318,8 +315,7 @@  discard block
 block discarded – undo
318 315
           '#element_validate' => array('_element_validate_integer_positive'),
319 316
           '#required' => TRUE,
320 317
         );
321
-      }
322
-      else {
318
+      } else {
323 319
         $form['rows'] = array(
324 320
           '#type' => 'textfield',
325 321
           '#title' => t('Rows'),
Please login to merge, or discard this patch.
boinc/modules/contrib/cck/modules/userreference/userreference.module 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -92,8 +92,7 @@  discard block
 block discarded – undo
92 92
           if ($view->base_table == 'users' && !empty($view->display['default']->display_options['fields'])) {
93 93
             if ($view->type == 'Default') {
94 94
               $views[t('Default Views')][$view->name] = $view->name;
95
-            }
96
-            else {
95
+            } else {
97 96
               $views[t('Existing Views')][$view->name] = $view->name;
98 97
             }
99 98
           }
@@ -121,8 +120,7 @@  discard block
 block discarded – undo
121 120
             '#required' => FALSE,
122 121
             '#description' => t('Provide a comma separated list of arguments to pass to the view.'),
123 122
           );
124
-        }
125
-        else {
123
+        } else {
126 124
           $form['advanced']['no_view_help'] = array(
127 125
             '#value' => t('<p>The list of user that can be referenced can be based on a "Views module" view but no appropriate views were found. <br />Note:</p>') .
128 126
               t('<ul><li>Only views that have fields will work for this purpose.</li><li>This will discard the "Referenceable Roles" and "Referenceable Status" settings above. Use the view\'s "filters" section instead.</li><li>Use the view\'s "fields" section to display additional informations about candidate users on user creation/edition form.</li><li>Use the view\'s "sort criteria" section to determine the order in which candidate users will be displayed.</li></ul>'),
@@ -188,8 +186,7 @@  discard block
 block discarded – undo
188 186
         if (is_array($item) && !empty($item['uid'])) {
189 187
           if (is_numeric($item['uid'])) {
190 188
             $ids[] = $item['uid'];
191
-          }
192
-          else {
189
+          } else {
193 190
             $error_element = isset($item['_error_element']) ? $item['_error_element'] : '';
194 191
             if (is_array($item) && isset($item['_error_element'])) unset($item['_error_element']);
195 192
             form_set_error($error_element, t('%name: invalid input.', array('%name' => t($field['widget']['label']))));
@@ -367,8 +364,7 @@  discard block
 block discarded – undo
367 364
           '#element_validate' => array('_element_validate_integer_positive'),
368 365
           '#required' => TRUE,
369 366
         );
370
-      }
371
-      else {
367
+      } else {
372 368
         $form['autocomplete_match'] = array('#type' => 'hidden', '#value' => $match);
373 369
         $form['size'] = array('#type' => 'hidden', '#value' => $size);
374 370
       }
@@ -612,8 +608,7 @@  discard block
 block discarded – undo
612 608
     $reference = _userreference_potential_references($field, $value, 'equals', NULL, 1);
613 609
     if (empty($reference)) {
614 610
       form_error($element[$field_key], t('%name: found no valid user with that name.', array('%name' => t($field['widget']['label']))));
615
-    }
616
-    else {
611
+    } else {
617 612
       $uid = key($reference);
618 613
     }
619 614
   }
@@ -733,8 +728,7 @@  discard block
 block discarded – undo
733 728
     if (!empty($field['advanced_view_args'])) {
734 729
       // TODO: Support Tokens using token.module ?
735 730
       $view_args = array_map('trim', explode(',', $field['advanced_view_args']));
736
-    }
737
-    else {
731
+    } else {
738 732
       $view_args = array();
739 733
     }
740 734
 
@@ -759,8 +753,7 @@  discard block
 block discarded – undo
759 753
 
760 754
     // Get the results.
761 755
     $result = $view->execute_display($display, $view_args);
762
-  }
763
-  else {
756
+  } else {
764 757
     $result = FALSE;
765 758
   }
766 759
 
@@ -785,12 +778,10 @@  discard block
 block discarded – undo
785 778
     );
786 779
     $where[] = 'u.name '. (isset($match_clauses[$match]) ? $match_clauses[$match] : $match_clauses['contains']);
787 780
     $args[] = $string;
788
-  }
789
-  elseif ($ids) {
781
+  } elseif ($ids) {
790 782
     $where[] = 'u.uid IN (' . db_placeholders($ids) . ')';
791 783
     $args = array_merge($args, $ids);
792
-  }
793
-  else {
784
+  } else {
794 785
     $where[] = "u.uid > 0";
795 786
   }
796 787
 
Please login to merge, or discard this patch.
default/boinc/modules/contrib/cck/modules/content_copy/content_copy.module 1 patch
Braces   +7 added lines, -11 removed lines patch added patch discarded remove patch
@@ -182,7 +182,8 @@  discard block
 block discarded – undo
182 182
       break;
183 183
   }
184 184
 
185
-  if ($step < 3) {  // Omit submit button on the textarea block to display the export data.
185
+  if ($step < 3) {
186
+// Omit submit button on the textarea block to display the export data.
186 187
     $form['submit'] = array(
187 188
       '#type' => 'submit',
188 189
       '#value' => t('Export'),
@@ -374,8 +375,7 @@  discard block
 block discarded – undo
374 375
   $imported_groups = array();
375 376
   if (isset($content['groups']) && module_exists('fieldgroup')) {
376 377
     $imported_groups = (array) $content['groups'];
377
-  }
378
-  elseif (isset($content['groups']) && is_array($content['groups'])) {
378
+  } elseif (isset($content['groups']) && is_array($content['groups'])) {
379 379
     $not_enabled[] = 'fieldgroup';
380 380
   }
381 381
 
@@ -384,8 +384,7 @@  discard block
 block discarded – undo
384 384
     $field = content_field_instance_collapse($import);
385 385
     if (empty($field['module']) || empty($field['widget_module'])) {
386 386
       $not_enabled[] = $field['field_name'];
387
-    }
388
-    else {
387
+    } else {
389 388
       if (!module_exists($field['module'])) {
390 389
         $not_enabled[] = $field['module'];
391 390
       }
@@ -466,8 +465,7 @@  discard block
 block discarded – undo
466 465
     if (!empty($field['field_name']) && isset($content_info['content types'][$type_name]['fields'][$field_name])) {
467 466
       drupal_set_message(t('The imported field %field_label (%field_name) was not added to %type because that field already exists in %type.', array(
468 467
         '%field_label' => $field['label'], '%field_name' => $field_name, '%type' => $type_label)));
469
-    }
470
-    else {
468
+    } else {
471 469
       $field = content_field_instance_create($field, FALSE);
472 470
       $rebuild = TRUE;
473 471
       drupal_set_message(t('The field %field_label (%field_name) was added to the content type %type.', array(
@@ -573,8 +571,7 @@  discard block
 block discarded – undo
573 571
       if (isset($edit['field_widget_type'])) {
574 572
         $tmp = explode('-', $edit['field_widget_type']);
575 573
         $field_name = $tmp[0];
576
-      }
577
-      else {
574
+      } else {
578 575
         $field_name = isset($edit['field_name']) ? $edit['field_name'] : '';
579 576
       }
580 577
 
@@ -590,8 +587,7 @@  discard block
 block discarded – undo
590 587
              '%field_name' => $field_name,
591 588
              '%db_err' => $db_err
592 589
         )));
593
-      }
594
-      else {
590
+      } else {
595 591
         // The db fetch occurred successfully, unserialize the data blob and
596 592
         // insert it into a new "display_settings" field of the data.
597 593
         if ($display_settings = unserialize($row_info['display_settings'])) {
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/cck/content.module 1 patch
Braces   +36 added lines, -72 removed lines patch added patch discarded remove patch
@@ -242,8 +242,7 @@  discard block
 block discarded – undo
242 242
     foreach ($cached->data as $key => $value) {
243 243
       $node->$key = $value;
244 244
     }
245
-  }
246
-  else {
245
+  } else {
247 246
     $default_additions = _content_field_invoke_default('load', $node);
248 247
     if ($default_additions) {
249 248
       foreach ($default_additions as $key => $value) {
@@ -458,8 +457,7 @@  discard block
 block discarded – undo
458 457
       // render arrays. Check we're not on a form first.
459 458
       if (!isset($elements['#build_id']) && isset($value['view']) && isset($elements[$value['view']])) {
460 459
         $elements[$value['view']]['#weight'] = $value['weight'];
461
-      }
462
-      elseif (isset($elements[$key])) {
460
+      } elseif (isset($elements[$key])) {
463 461
         $elements[$key]['#weight'] = $value['weight'];
464 462
       }
465 463
     }
@@ -530,8 +528,7 @@  discard block
 block discarded – undo
530 528
     $output .= drupal_render($element[$element['#field_name'] .'_add_more']);
531 529
 
532 530
     drupal_add_tabledrag($table_id, 'order', 'sibling', $order_class);
533
-  }
534
-  else {
531
+  } else {
535 532
     foreach (element_children($element) as $key) {
536 533
       $output .= drupal_render($element[$key]);
537 534
     }
@@ -744,8 +741,7 @@  discard block
 block discarded – undo
744 741
       // NODE_BUILD_NORMAL is 0, and ('whatever' == 0) is TRUE, so we need a ===.
745 742
       if ($node->build_mode === NODE_BUILD_NORMAL || $node->build_mode == NODE_BUILD_PREVIEW) {
746 743
         $context = $teaser ? 'teaser' : 'full';
747
-      }
748
-      else {
744
+      } else {
749 745
         $context = $node->build_mode;
750 746
       }
751 747
       // The field may be missing info for $contexts added by modules
@@ -797,8 +793,7 @@  discard block
 block discarded – undo
797 793
             $element['items'][$delta] += $format_info;
798 794
             $element['items'][$delta]['#item']['#delta'] = $delta;
799 795
           }
800
-        }
801
-        else {
796
+        } else {
802 797
           $element['items'] += $format_info;
803 798
         }
804 799
 
@@ -829,8 +824,7 @@  discard block
 block discarded – undo
829 824
       $wrapper = NULL;
830 825
       if (isset($node->content[$field['field_name']])) {
831 826
         $wrapper = $node->content[$field['field_name']];
832
-      }
833
-      elseif (module_exists('fieldgroup') && ($group_name = fieldgroup_get_group($node->type, $field['field_name'])) && isset($node->content[$group_name]['group'][$field['field_name']])) {
827
+      } elseif (module_exists('fieldgroup') && ($group_name = fieldgroup_get_group($node->type, $field['field_name'])) && isset($node->content[$group_name]['group'][$field['field_name']])) {
834 828
         $wrapper = $node->content[$group_name]['group'][$field['field_name']];
835 829
       }
836 830
 
@@ -844,13 +838,11 @@  discard block
 block discarded – undo
844 838
               // '#chilren' is not set if the field is empty.
845 839
               $items[$delta]['view'] = isset($element['items'][$delta]['#children']) ? $element['items'][$delta]['#children'] : '';
846 840
             }
847
-          }
848
-          elseif (isset($element['items']['#children']))  {
841
+          } elseif (isset($element['items']['#children'])) {
849 842
             // Multiple values formatter.
850 843
             $items[0]['view'] = $element['items']['#children'];
851 844
           }
852
-        }
853
-        else {
845
+        } else {
854 846
           // Hidden or inaccessible field.
855 847
           $items[0]['view'] = '';
856 848
         }
@@ -866,8 +858,7 @@  discard block
 block discarded – undo
866 858
       $wrapper = NULL;
867 859
       if (isset($node->content[$field['field_name']])) {
868 860
         $wrapper = $node->content[$field['field_name']];
869
-      }
870
-      elseif (module_exists('fieldgroup') && ($group_name = fieldgroup_get_group($node->type, $field['field_name'])) && isset($node->content[$group_name]['group'][$field['field_name']])) {
861
+      } elseif (module_exists('fieldgroup') && ($group_name = fieldgroup_get_group($node->type, $field['field_name'])) && isset($node->content[$group_name]['group'][$field['field_name']])) {
871 862
         $wrapper = $node->content[$group_name]['group'][$field['field_name']];
872 863
       }
873 864
 
@@ -1050,8 +1041,7 @@  discard block
 block discarded – undo
1050 1041
           // how to handle that.
1051 1042
           if (db_result(db_query("SELECT COUNT(*) FROM {". $table ."} WHERE vid = %d", $node->vid))) {
1052 1043
             content_write_record($table, $record, array('vid'));
1053
-          }
1054
-          else {
1044
+          } else {
1055 1045
             content_write_record($table, $record);
1056 1046
           }
1057 1047
         }
@@ -1134,8 +1124,7 @@  discard block
 block discarded – undo
1134 1124
   if (is_array($object)) {
1135 1125
     $object = (object) $object;
1136 1126
     $array = TRUE;
1137
-  }
1138
-  else {
1127
+  } else {
1139 1128
     $array = FALSE;
1140 1129
   }
1141 1130
 
@@ -1174,12 +1163,10 @@  discard block
 block discarded – undo
1174 1163
 
1175 1164
         if (empty($info['serialize'])) {
1176 1165
           $values[] = $object->$field;
1177
-        }
1178
-        else {
1166
+        } else {
1179 1167
           $values[] = serialize($object->$field);
1180 1168
         }
1181
-      }
1182
-      else {
1169
+      } else {
1183 1170
         $placeholders[] = 'NULL';
1184 1171
       }
1185 1172
     }
@@ -1190,8 +1177,7 @@  discard block
 block discarded – undo
1190 1177
   if (!count($update)) {
1191 1178
     $query = "INSERT INTO {". $table ."} (". implode(', ', $fields) .') VALUES ('. implode(', ', $placeholders) .')';
1192 1179
     $return = SAVED_NEW;
1193
-  }
1194
-  else {
1180
+  } else {
1195 1181
     $query = '';
1196 1182
     foreach ($fields as $id => $field) {
1197 1183
       if ($query) {
@@ -1253,8 +1239,7 @@  discard block
 block discarded – undo
1253 1239
       $result = $function($op, $node, $field, $items, $teaser, $page);
1254 1240
       if (is_array($result)) {
1255 1241
         $return = array_merge($return, $result);
1256
-      }
1257
-      else if (isset($result)) {
1242
+      } else if (isset($result)) {
1258 1243
         $return[] = $result;
1259 1244
       }
1260 1245
     }
@@ -1279,15 +1264,13 @@  discard block
 block discarded – undo
1279 1264
   // rather than by field.
1280 1265
   if (in_array($op, array('load', 'insert', 'update', 'delete', 'delete revision'))) {
1281 1266
     return content_storage($op, $node);
1282
-  }
1283
-  else {
1267
+  } else {
1284 1268
     foreach ($type['fields'] as $field) {
1285 1269
       $items = isset($node->$field['field_name']) ? $node->$field['field_name'] : array();
1286 1270
       $result = content_field($op, $node, $field, $items, $teaser, $page);
1287 1271
       if (is_array($result)) {
1288 1272
         $return = array_merge($return, $result);
1289
-      }
1290
-      else if (isset($result)) {
1273
+      } else if (isset($result)) {
1291 1274
         $return[] = $result;
1292 1275
       }
1293 1276
       if (isset($node->$field['field_name'])) {
@@ -1410,8 +1393,7 @@  discard block
 block discarded – undo
1410 1393
 
1411 1394
     if (!$reset && $cached = cache_get('content_type_info:'. $language->language, content_cache_tablename())) {
1412 1395
       $info = $cached->data;
1413
-    }
1414
-    else {
1396
+    } else {
1415 1397
       $info = array(
1416 1398
         'field types' => array(),
1417 1399
         'widget types' => array(),
@@ -1580,8 +1562,7 @@  discard block
 block discarded – undo
1580 1562
   $db_info = array();
1581 1563
   if ($field['db_storage'] == CONTENT_DB_STORAGE_PER_FIELD) {
1582 1564
     $db_info['table'] = _content_tablename($field['field_name'], CONTENT_DB_STORAGE_PER_FIELD);
1583
-  }
1584
-  else {
1565
+  } else {
1585 1566
     $db_info['table'] = _content_tablename($field['type_name'], CONTENT_DB_STORAGE_PER_CONTENT_TYPE);
1586 1567
   }
1587 1568
 
@@ -1600,8 +1581,7 @@  discard block
 block discarded – undo
1600 1581
 function content_storage_type($field) {
1601 1582
   if ($field['multiple'] > 0) {
1602 1583
     return CONTENT_DB_STORAGE_PER_FIELD;
1603
-  }
1604
-  else {
1584
+  } else {
1605 1585
     module_load_include('inc', 'content', 'includes/content.crud');
1606 1586
     $instances = content_field_instance_read(array('field_name' => $field['field_name']));
1607 1587
     if (count($instances) > 1) {
@@ -1655,8 +1635,7 @@  discard block
 block discarded – undo
1655 1635
     foreach ($array as $key => $value) {
1656 1636
       if (is_array($value)) {
1657 1637
         $result += content_array_flatten($value);
1658
-      }
1659
-      else {
1638
+      } else {
1660 1639
         $result[$key] = $value;
1661 1640
       }
1662 1641
     }
@@ -1711,8 +1690,7 @@  discard block
 block discarded – undo
1711 1690
       if (strpos($opt, '|') !== FALSE) {
1712 1691
         list($key, $value) = explode('|', $opt);
1713 1692
         $allowed_values[$cid][$key] = (isset($value) && $value !=='') ? $value : $key;
1714
-      }
1715
-      else {
1693
+      } else {
1716 1694
         $allowed_values[$cid][$opt] = $opt;
1717 1695
       }
1718 1696
     }
@@ -1733,8 +1711,7 @@  discard block
 block discarded – undo
1733 1711
   foreach ($options as $key => $opt) {
1734 1712
     if (is_array($opt)) {
1735 1713
       content_allowed_values_filter_html($options[$key]);
1736
-    }
1737
-    else {
1714
+    } else {
1738 1715
       $options[$key] = html_entity_decode(strip_tags($opt), ENT_QUOTES);
1739 1716
     }
1740 1717
   }
@@ -1817,8 +1794,7 @@  discard block
 block discarded – undo
1817 1794
       }
1818 1795
 
1819 1796
       $element['#item'] = $items[0];
1820
-    }
1821
-    else {
1797
+    } else {
1822 1798
       // Multiple values formatter.
1823 1799
       $items = $item;
1824 1800
       $function = $field['module'] .'_field';
@@ -1869,11 +1845,9 @@  discard block
 block discarded – undo
1869 1845
 
1870 1846
   if ($selector === '_tabs') {
1871 1847
     return $info['tabs'];
1872
-  }
1873
-  elseif (isset($selector) && isset($info['tabs'][$selector])) {
1848
+  } elseif (isset($selector) && isset($info['tabs'][$selector])) {
1874 1849
     return isset($info['tabs'][$selector]) ? $info['tabs'][$selector]['build modes'] : array();
1875
-  }
1876
-  else {
1850
+  } else {
1877 1851
     return $info['build modes'];
1878 1852
   }
1879 1853
 }
@@ -1987,8 +1961,7 @@  discard block
 block discarded – undo
1987 1961
 
1988 1962
   if ($version < 1003) {
1989 1963
     $version = 0;
1990
-  }
1991
-  else {
1964
+  } else {
1992 1965
     $version = 1003;
1993 1966
   }
1994 1967
 
@@ -2042,8 +2015,7 @@  discard block
 block discarded – undo
2042 2015
 function content_cache_tablename() {
2043 2016
   if (variable_get('content_schema_version', -1) < 6000) {
2044 2017
     return 'cache';
2045
-  }
2046
-  else {
2018
+  } else {
2047 2019
     return 'cache_content';
2048 2020
   }
2049 2021
 }
@@ -2125,8 +2097,7 @@  discard block
 block discarded – undo
2125 2097
       return FALSE;
2126 2098
     }
2127 2099
     return (bool)db_result(db_query("SHOW INDEX FROM {". $table ."} WHERE key_name = '$name'"));
2128
-  }
2129
-  elseif ($db_type == 'pgsql') {
2100
+  } elseif ($db_type == 'pgsql') {
2130 2101
     // Note that the index names in Schema API for PostgreSQL are prefixed by
2131 2102
     // the table name and suffixed by '_idx'.
2132 2103
     return (bool)db_result(db_query("SELECT COUNT(indexname) FROM pg_indexes WHERE indexname = '{". $table ."}_{$name}_idx'"));
@@ -2222,8 +2193,7 @@  discard block
 block discarded – undo
2222 2193
     if (is_array($result)) {
2223 2194
       $default_value = $result;
2224 2195
     }
2225
-  }
2226
-  elseif (!empty($field['widget']['default_value'])) {
2196
+  } elseif (!empty($field['widget']['default_value'])) {
2227 2197
     $default_value = $field['widget']['default_value'];
2228 2198
   }
2229 2199
   return (array) $default_value;
@@ -2336,8 +2306,7 @@  discard block
 block discarded – undo
2336 2306
     || !is_array($object['display_settings'][$context])
2337 2307
     || empty($object['display_settings'][$context]['exclude'])) {
2338 2308
     return FALSE;
2339
-  }
2340
-  else {
2309
+  } else {
2341 2310
     return TRUE;
2342 2311
   }
2343 2312
 }
@@ -2372,8 +2341,7 @@  discard block
 block discarded – undo
2372 2341
       // Use isset() to avoid undefined index message on #children when field values are empty.
2373 2342
       $variables['items'][$delta]['view'] = isset($element['items'][$delta]['#children']) ? $element['items'][$delta]['#children'] : '';
2374 2343
     }
2375
-  }
2376
-  else  {
2344
+  } else {
2377 2345
     // Multiple values formatter.
2378 2346
     // We display the 'all items' output as $items[0], as if it was the
2379 2347
     // output of a single valued field.
@@ -2392,8 +2360,7 @@  discard block
 block discarded – undo
2392 2360
   foreach ($variables['items'] as $delta => $item) {
2393 2361
     if (!isset($item['view']) || (empty($item['view']) && (string)$item['view'] !== '0')) {
2394 2362
       $variables['items'][$delta]['empty'] = TRUE;
2395
-    }
2396
-    else {
2363
+    } else {
2397 2364
       $field_empty = FALSE;
2398 2365
       $variables['items'][$delta]['empty'] = FALSE;
2399 2366
     }
@@ -2643,8 +2610,7 @@  discard block
 block discarded – undo
2643 2610
     $db_info = content_database_info($field);
2644 2611
     if (!empty($type_name)) {
2645 2612
       $delta = db_result(db_query("SELECT MAX(delta) FROM {". $db_info['table'] ."} f LEFT JOIN {node} n ON f.vid = n.vid WHERE n.type = '%s'", $type_name));
2646
-    }
2647
-    else {
2613
+    } else {
2648 2614
       $delta = db_result(db_query("SELECT MAX(delta) FROM {". $db_info['table'] ."}"));
2649 2615
     }
2650 2616
     if ($delta >= 0) {
@@ -2663,8 +2629,7 @@  discard block
 block discarded – undo
2663 2629
   if (!empty($type_name)) {
2664 2630
     $param = array('type_name' => $type_name);
2665 2631
     $inactive = array($type_name => array());
2666
-  }
2667
-  else {
2632
+  } else {
2668 2633
     $param = array();
2669 2634
     $inactive = array();
2670 2635
   }
@@ -2693,8 +2658,7 @@  discard block
 block discarded – undo
2693 2658
   if (!empty($type_name)) {
2694 2659
     $param = array('type_name' => $type_name);
2695 2660
     $inactive = array($type_name => array());
2696
-  }
2697
-  else {
2661
+  } else {
2698 2662
     $param = array();
2699 2663
     $inactive = array();
2700 2664
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/jump/jump.module 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@  discard block
 block discarded – undo
94 94
         // Use the menu label as the default block subject
95 95
         $menus = menu_get_menus();
96 96
         $subject = $menus[$jumpmenu_name];
97
-      }
98
-      else if ($jumpmenu_type == 'taxo') {
97
+      } else if ($jumpmenu_type == 'taxo') {
99 98
         $form = jump_quickly($jumpmenu_name, 'taxo', $active);
100 99
 
101 100
         // Use the vocabulary name as the default block subject
@@ -137,13 +136,11 @@  discard block
 block discarded – undo
137 136
 
138 137
   if (is_array($name)) {
139 138
     $options = $name;
140
-  }
141
-  else {
139
+  } else {
142 140
     $options = array();
143 141
     if ($type == 'menu') {
144 142
       jump_menu_get_menu_options($options, $name);
145
-    }
146
-    elseif ($type == 'taxo') {
143
+    } elseif ($type == 'taxo') {
147 144
       jump_menu_get_taxo_options($options, $name);
148 145
     }
149 146
   }
@@ -215,8 +212,7 @@  discard block
 block discarded – undo
215 212
     $fragment = explode('#', $form_state['values']['jump_goto']);
216 213
     if (isset($fragment[1])) {
217 214
       drupal_goto($fragment[0], NULL, $fragment[1]);
218
-    }
219
-    else {
215
+    } else {
220 216
       drupal_goto($form_state['values']['jump_goto']);
221 217
     }
222 218
   }
Please login to merge, or discard this patch.
html/ops/bbcode_convert_response1.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,14 +43,15 @@
 block discarded – undo
43 43
     $profiles = _mysql_query("select * from profile where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45 45
     $i=0;
46
-    while ($profile = _mysql_fetch_object($profiles)){
46
+    while ($profile = _mysql_fetch_object($profiles)) {
47 47
         $i++; 
48
-        if ($i%100 == 0) {                      //For every 100 profiles
48
+        if ($i%100 == 0) {
49
+//For every 100 profiles
49 50
             echo $profile->userid.". "; flush();   // print out where we are
50 51
             //usleep(200000);
51 52
         }
52 53
         
53
-        if ($profile->userid > $start_id){
54
+        if ($profile->userid > $start_id) {
54 55
             fix_profile($profile);
55 56
         }
56 57
     }
Please login to merge, or discard this patch.
html/user/top_hosts.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 $cache_args = "sort_by=$sort_by&offset=$offset";
63 63
 $cacheddata = get_cached_data(TOP_PAGES_TTL, $cache_args);
64
-if ($cacheddata){
64
+if ($cacheddata) {
65 65
     $data = unserialize($cacheddata);
66 66
 } else {
67 67
     $data = get_top_hosts($offset,$sort_by);
@@ -87,7 +87,8 @@  discard block
 block discarded – undo
87 87
 
88 88
 }
89 89
 
90
-if ($n==$hosts_per_page){ //If we aren't on the last page
90
+if ($n==$hosts_per_page) {
91
+//If we aren't on the last page
91 92
     $new_offset = $offset + $hosts_per_page;
92 93
     echo "<a href=top_hosts.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Next %1", $hosts_per_page)."</a>";
93 94
 }
Please login to merge, or discard this patch.
html/user/top_teams.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 }
33 33
 define('ITEM_LIMIT', 10000);
34 34
 
35
-function get_top_teams($offset, $sort_by, $type){
35
+function get_top_teams($offset, $sort_by, $type) {
36 36
     global $teams_per_page;
37 37
     $db = BoincDb::get(true);
38 38
     $type_clause = null;
39
-    if ($type){
39
+    if ($type) {
40 40
         $type_clause = "type=$type";
41 41
     }
42 42
     if ($sort_by == "total_credit") {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     $cache_args = "sort_by=$sort_by&offset=$offset$type_url";
76 76
     $cacheddata = get_cached_data(TOP_PAGES_TTL,$cache_args);
77 77
     //If we have got the data in cache
78
-    if ($cacheddata){
78
+    if ($cacheddata) {
79 79
         $data = unserialize($cacheddata); // use the cached data
80 80
     } else {
81 81
         //if not do queries etc to generate new data
@@ -115,7 +115,8 @@  discard block
 block discarded – undo
115 115
         echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">".tra("Previous %1", $teams_per_page)."</a> &middot; ";
116 116
 
117 117
     }
118
-    if ($n==$teams_per_page){ //If we aren't on the last page
118
+    if ($n==$teams_per_page) {
119
+//If we aren't on the last page
119 120
         $new_offset = $offset + $teams_per_page;
120 121
         echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">".tra("Next %1", $teams_per_page)."</a>";
121 122
     }
Please login to merge, or discard this patch.
html/ops/delete_spammers.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -368,7 +368,8 @@
 block discarded – undo
368 368
         $min_days = $argv[++$i];
369 369
     } else if ($argv[$i] == "--max_days") {
370 370
         $max_days = $argv[++$i];
371
-    } else if ($argv[$i] == "--days") {     // deprecated
371
+    } else if ($argv[$i] == "--days") {
372
+// deprecated
372 373
         $max_days = $argv[++$i];
373 374
     }
374 375
 }
Please login to merge, or discard this patch.