Passed
Push — master ( 0f8b85...1af5ec )
by Kevin
15:29 queued 03:24
created
drupal/sites/default/boinc/modules/contrib/cck/includes/content.crud.inc 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     $field['active'] = 1;
43 43
   }
44 44
 
45
-  $field['columns'] = (array) module_invoke($module, 'field_settings', 'database columns', $field);
45
+  $field['columns'] = (array)module_invoke($module, 'field_settings', 'database columns', $field);
46 46
   // Ensure columns always default to NULL values.
47 47
   foreach ($field['columns'] as $column_name => $column) {
48 48
     $field['columns'][$column_name]['not null'] = FALSE;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
   $field['db_storage'] = CONTENT_DB_STORAGE_PER_CONTENT_TYPE;
54 54
 
55 55
   // Make sure field settings all have an index in the array.
56
-  $setting_names = (array) module_invoke($module, 'field_settings', 'save', $field);
56
+  $setting_names = (array)module_invoke($module, 'field_settings', 'save', $field);
57 57
   drupal_alter('field_settings', $setting_names, 'save', $field);
58 58
   foreach ($setting_names as $setting) {
59 59
     $field[$setting] = NULL;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
   }
93 93
 
94 94
   // Make sure widget settings all have an index in the array.
95
-  $settings_names = (array) module_invoke($module, 'widget_settings', 'save', $widget);
95
+  $settings_names = (array)module_invoke($module, 'widget_settings', 'save', $widget);
96 96
   drupal_alter('widget_settings', $settings_names, 'save', $widget);
97 97
   $widget['widget_settings'] = array();
98 98
   foreach ($settings_names as $name) {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
   // initialize $widget_settings with default values,
134 134
   if (isset($field['default_value']) && isset($field['default_value_php']) &&
135 135
       content_callback('widget', 'default value', $field) == CONTENT_CALLBACK_DEFAULT) {
136
-    $field['widget']['default_value'] = !empty($field['default_value']) ? $field['default_value']  : NULL;
136
+    $field['widget']['default_value'] = !empty($field['default_value']) ? $field['default_value'] : NULL;
137 137
     $field['widget']['default_value_php'] = !empty($field['default_value_php']) ? $field['default_value_php'] : NULL;
138 138
     unset($field['default_value']);
139 139
     unset($field['default_value_php']);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
  * @see menu_rebuild()
209 209
  */
210 210
 function content_field_instance_create($field, $rebuild = TRUE) {
211
-  include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
211
+  include_once('./'.drupal_get_path('module', 'content').'/includes/content.admin.inc');
212 212
 
213 213
   $form_values = $field;
214 214
   $field = content_field_instance_expand($field);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
   $field['db_storage'] = content_storage_type($field);
256 256
 
257 257
   // Get a fresh copy of the column information whenever a field is created.
258
-  $field['columns'] = (array) module_invoke($field['module'], 'field_settings', 'database columns', $field);
258
+  $field['columns'] = (array)module_invoke($field['module'], 'field_settings', 'database columns', $field);
259 259
 
260 260
   if (empty($prev_field['widget']) || $prior_instances < 1) {
261 261
     // If this is the first instance, create the field.
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
  * @see menu_rebuild()
320 320
  */
321 321
 function content_field_instance_update($field, $rebuild = TRUE) {
322
-  include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
322
+  include_once('./'.drupal_get_path('module', 'content').'/includes/content.admin.inc');
323 323
 
324 324
   // Ensure the field description is in the 'expanded' form.
325 325
   $field = content_field_instance_expand($field);
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 
346 346
   // Changes in field values may affect columns, or column
347 347
   // information may have changed, get a fresh copy.
348
-  $field['columns'] = (array) module_invoke($field['module'], 'field_settings', 'database columns', $field);
348
+  $field['columns'] = (array)module_invoke($field['module'], 'field_settings', 'database columns', $field);
349 349
 
350 350
   // If the database storage has changed, update the field and previous instances.
351 351
   $prior_instances = content_field_instance_read(array('field_name' => $field['field_name']));
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 function _content_field_write($field, $op = 'update') {
400 400
   // Rearrange the data to create the global_settings array.
401 401
   $field['global_settings'] = array();
402
-  $setting_names = (array) module_invoke($field['module'], 'field_settings', 'save', $field);
402
+  $setting_names = (array)module_invoke($field['module'], 'field_settings', 'save', $field);
403 403
   drupal_alter('field_settings', $setting_names, 'save', $field);
404 404
 
405 405
   foreach ($setting_names as $setting) {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
   $field = content_field_instance_collapse($field);
436 436
 
437 437
   // Rearrange the data to create the widget_settings array.
438
-  $setting_names = (array) module_invoke($field['widget_module'], 'widget_settings', 'save', $field);
438
+  $setting_names = (array)module_invoke($field['widget_module'], 'widget_settings', 'save', $field);
439 439
   drupal_alter('widget_settings', $setting_names, 'save', $field);
440 440
   foreach ($setting_names as $setting) {
441 441
     // In some cases (when the updated $field was originally read from
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
   if (is_array($param)) {
479 479
     // Turn the conditions into a query.
480 480
     foreach ($param as $key => $value) {
481
-      $cond[] = 'nfi.'. db_escape_string($key) ." = '%s'";
481
+      $cond[] = 'nfi.'.db_escape_string($key)." = '%s'";
482 482
       $args[] = $value;
483 483
     }
484 484
   }
@@ -486,17 +486,17 @@  discard block
 block discarded – undo
486 486
     $cond[] = 'nf.active = 1';
487 487
     $cond[] = 'nfi.widget_active = 1';
488 488
   }
489
-  $where = $cond ? ' WHERE '. implode(' AND ', $cond) : '';
489
+  $where = $cond ? ' WHERE '.implode(' AND ', $cond) : '';
490 490
 
491
-  $db_result = db_query("SELECT * FROM {". content_instance_tablename() ."} nfi ".
492
-    " JOIN {". content_field_tablename() ."} nf ON nfi.field_name = nf.field_name ".
491
+  $db_result = db_query("SELECT * FROM {".content_instance_tablename()."} nfi ".
492
+    " JOIN {".content_field_tablename()."} nf ON nfi.field_name = nf.field_name ".
493 493
     "$where ORDER BY nfi.weight ASC, nfi.label ASC", $args);
494 494
 
495 495
   $fields = array();
496 496
   while ($instance = db_fetch_array($db_result)) {
497 497
     // Unserialize arrays.
498 498
     foreach (array('widget_settings', 'display_settings', 'global_settings', 'db_columns') as $key) {
499
-      $instance[$key] = (!empty($instance[$key])) ? (array) unserialize($instance[$key]) : array();
499
+      $instance[$key] = (!empty($instance[$key])) ? (array)unserialize($instance[$key]) : array();
500 500
     }
501 501
     // 'columns' is a reserved word in MySQL4, so our column is named 'db_columns'.
502 502
     $instance['columns'] = $instance['db_columns'];
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
  * @see menu_rebuild()
545 545
  */
546 546
 function content_field_instance_delete($field_name, $type_name, $rebuild = TRUE) {
547
-  include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
547
+  include_once('./'.drupal_get_path('module', 'content').'/includes/content.admin.inc');
548 548
 
549 549
   // Get the previous field value.
550 550
   $field = array_pop(content_field_instance_read(array('field_name' => $field_name, 'type_name' => $type_name)));
@@ -552,13 +552,13 @@  discard block
 block discarded – undo
552 552
   // Invoke hook_content_fieldapi().
553 553
   module_invoke_all('content_fieldapi', 'delete instance', $field);
554 554
 
555
-  db_query("DELETE FROM {". content_instance_tablename() .
555
+  db_query("DELETE FROM {".content_instance_tablename().
556 556
     "} WHERE field_name = '%s' AND type_name = '%s'", $field['field_name'], $field['type_name']);
557 557
 
558 558
   // If no instances remain, delete the field entirely.
559 559
   $instances = content_field_instance_read(array('field_name' => $field_name));
560 560
   if (sizeof($instances) < 1) {
561
-    db_query("DELETE FROM {". content_field_tablename() ."} WHERE field_name = '%s'", $field['field_name']);
561
+    db_query("DELETE FROM {".content_field_tablename()."} WHERE field_name = '%s'", $field['field_name']);
562 562
     content_alter_schema($field, array());
563 563
   }
564 564
   // If only one instance remains, we may need to change the database
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
   // If content module has been uninstalled first, all tables
601 601
   // have already been dropped, and running that code will raise errors.
602 602
   if (db_table_exists(content_instance_tablename())) {
603
-    $results = db_query("SELECT field_name, type_name FROM {". content_instance_tablename() ."} WHERE widget_module = '%s'", $module);
603
+    $results = db_query("SELECT field_name, type_name FROM {".content_instance_tablename()."} WHERE widget_module = '%s'", $module);
604 604
     while ($field = db_fetch_array($results)) {
605 605
       content_field_instance_delete($field['field_name'], $field['type_name'], FALSE);
606 606
     }
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 function content_type_update($info) {
635 635
   if (!empty($info->old_type) && $info->old_type != $info->type) {
636 636
     // Rename the content type in all fields that use changed content type.
637
-    db_query("UPDATE {". content_instance_tablename() ."} SET type_name='%s' WHERE type_name='%s'", array($info->type, $info->old_type));
637
+    db_query("UPDATE {".content_instance_tablename()."} SET type_name='%s' WHERE type_name='%s'", array($info->type, $info->old_type));
638 638
 
639 639
     // Rename the content fields table to match new content type name.
640 640
     $old_type = content_types($info->old_type);
@@ -648,9 +648,9 @@  discard block
 block discarded – undo
648 648
     }
649 649
 
650 650
     // Rename the variable storing weights for non-CCK fields.
651
-    if ($extra = variable_get('content_extra_weights_'. $info->old_type, array())) {
652
-      variable_set('content_extra_weights_'. $info->type, $extra);
653
-      variable_del('content_extra_weights_'. $info->old_type);
651
+    if ($extra = variable_get('content_extra_weights_'.$info->old_type, array())) {
652
+      variable_set('content_extra_weights_'.$info->type, $extra);
653
+      variable_del('content_extra_weights_'.$info->old_type);
654 654
     }
655 655
   }
656 656
 
Please login to merge, or discard this patch.
default/boinc/modules/contrib/cck/includes/views/content.views_convert.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@
 block discarded – undo
22 22
     foreach ($types as $ctype) {
23 23
       foreach ($ctype['fields'] as $field) {
24 24
         $module = $field['module'];
25
-        $result = (array) module_invoke($module, 'field_settings', 'views data', $field);
25
+        $result = (array)module_invoke($module, 'field_settings', 'views data', $field);
26 26
         drupal_alter('field_settings', $result, 'views data', $field);
27 27
         if (empty($result)) {
28 28
           // The views field name had the column name appended,
29 29
           // like field_name_value or field_username_uid.
30 30
           $column = array_shift(array_keys($field['columns']));
31
-          $views_fields[$field['field_name'] .'_'. $column] = $field;
31
+          $views_fields[$field['field_name'].'_'.$column] = $field;
32 32
         }
33 33
       }
34 34
     }
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/cck/includes/views/content.views.inc 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 function content_views_handlers() {
19 19
   return array(
20 20
     'info' => array(
21
-      'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
21
+      'path' => drupal_get_path('module', 'content').'/includes/views/handlers',
22 22
     ),
23 23
     'handlers' => array(
24 24
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     'module' => 'content', // This just tells our themes are elsewhere.
86 86
     'display' => array(
87 87
       'content_simple' => array(
88
-        'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
88
+        'path' => drupal_get_path('module', 'content').'/includes/views/handlers',
89 89
         // Those strings are not translated for now.
90 90
         // We'll need to change that if / when we remove 'no ui'
91 91
         'title' => 'Simple', // TODO: better name ? (currently not displayed anyway)
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         'accept attachments' => FALSE,
99 99
       ),
100 100
       'content_references' => array(
101
-        'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
101
+        'path' => drupal_get_path('module', 'content').'/includes/views/handlers',
102 102
         // Those strings are not translated for now.
103 103
         // We'll need to change that if / when we remove 'no ui'
104 104
         'title' => 'Simple - for reference fields', // TODO: better name ? (currently not displayed anyway)
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     ),
115 115
     'style' => array(
116 116
       'content_php_array_autocomplete' => array(
117
-        'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
117
+        'path' => drupal_get_path('module', 'content').'/includes/views/handlers',
118 118
         // Those strings are not translated for now.
119 119
         // We'll need to change that if / when we remove 'no ui'
120 120
         'title' => 'Results array (with title)',
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
   $data = array();
141 141
   foreach (content_fields() as $field) {
142 142
     $module = $field['module'];
143
-    $result = (array) module_invoke($module, 'field_settings', 'views data', $field);
143
+    $result = (array)module_invoke($module, 'field_settings', 'views data', $field);
144 144
     drupal_alter('field_settings', $result, 'views data', $field);
145 145
     if (empty($result)) {
146 146
       $result = content_views_field_views_data($field);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     }
179 179
 
180 180
     $data = array();
181
-    $data['table']['group']  = t('Content');
181
+    $data['table']['group'] = t('Content');
182 182
     $data['table']['join']['node'] = array(
183 183
       'table' => $db_info['table'],
184 184
       'left_field' => 'vid',
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         'group' => t('Content'),
263 263
         'title' => $title,
264 264
         'title short' => $title_short,
265
-        'help' =>  t($field_types[$field['type']]['label']) .' - '. t('Appears in: @types', array('@types' => implode(', ', $types))),
265
+        'help' =>  t($field_types[$field['type']]['label']).' - '.t('Appears in: @types', array('@types' => implode(', ', $types))),
266 266
       );
267 267
       if ($i == 0) {
268 268
         $data[$db_field]['field'] = array(
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
  * in the future without re-writing code.
360 360
  */
361 361
 function content_views_tablename($field) {
362
-  return 'node_data_'. $field['field_name'];
362
+  return 'node_data_'.$field['field_name'];
363 363
 }
364 364
 
365 365
 function theme_content_view_multiple_field($items, $field, $values) {
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
   $i = 0;
368 368
   foreach ($items as $item) {
369 369
     if (!empty($item) || $item == '0') {
370
-      $output .= '<div class="field-item field-item-'. $i .'">'. $item .'</div>';
370
+      $output .= '<div class="field-item field-item-'.$i.'">'.$item.'</div>';
371 371
       $i++;
372 372
     }
373 373
   }
Please login to merge, or discard this patch.
contrib/cck/includes/views/handlers/content_handler_argument_reference.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     $table_data = views_fetch_data($this->name_table);
17 17
     $table = array_shift($table_data['table']['join']);
18 18
 
19
-    $result = db_query("SELECT $this->name_field AS title FROM {". $table['table'] ."} WHERE ". $table['field'] ." IN ($placeholders)", $this->value);
19
+    $result = db_query("SELECT $this->name_field AS title FROM {".$table['table']."} WHERE ".$table['field']." IN ($placeholders)", $this->value);
20 20
     while ($row = db_fetch_object($result)) {
21 21
       $titles[] = check_plain($row->title);
22 22
     }
Please login to merge, or discard this patch.
contrib/cck/includes/views/handlers/content_handler_filter_many_to_one.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
   // or from content_allowed_values();
26 26
   function allowed_values() {
27 27
     $field = $this->content_field;
28
-    $function = $field['module'] .'_allowed_values';
28
+    $function = $field['module'].'_allowed_values';
29 29
     if ($this->value_form_type == 'select') {
30 30
       // Select elements accept multidimensional arrays to support optgroups.
31 31
       $options = function_exists($function) ? $function($field) : content_allowed_values($field, FALSE);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     else {
37 37
       $options = function_exists($function) ? $function($field) : content_allowed_values($field);
38 38
     }
39
-    return (array) $options;
39
+    return (array)$options;
40 40
   }
41 41
 
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
cck/includes/views/handlers/content_handler_argument_many_to_one.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
 
42 42
   function allowed_values() {
43 43
     $field = $this->content_field;
44
-    $function = $field['module'] .'_allowed_values';
44
+    $function = $field['module'].'_allowed_values';
45 45
     $options = function_exists($function) ? $function($field) : content_allowed_values($field);
46
-    return (array) $options;
46
+    return (array)$options;
47 47
   }
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
contrib/cck/includes/views/handlers/content_handler_field_multiple.inc 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
     foreach ($db_info['columns'] as $column => $attributes) {
169 169
       $query_columns[] = "$attributes[column] AS $column";
170 170
     }
171
-    $query = 'SELECT '. implode(', ', $query_columns) .
172
-             ' FROM {'. $db_info['table'] ."}".
173
-             " WHERE vid IN (". implode(',', $vids) .')'.
174
-             " ORDER BY _nid ASC, _delta ". ($options['multiple']['multiple_reversed'] ? 'DESC' : 'ASC');
171
+    $query = 'SELECT '.implode(', ', $query_columns).
172
+             ' FROM {'.$db_info['table']."}".
173
+             " WHERE vid IN (".implode(',', $vids).')'.
174
+             " ORDER BY _nid ASC, _delta ".($options['multiple']['multiple_reversed'] ? 'DESC' : 'ASC');
175 175
     $result = db_query($query);
176 176
 
177 177
     while ($item = db_fetch_array($result)) {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
           foreach ($items as $item) {
274 274
             $output = content_format($field, $item, $formatter_name, $node);
275 275
             if (!empty($output)) {
276
-              $rendered[] = $this->render_link($output, (object) array('nid' => $nid));
276
+              $rendered[] = $this->render_link($output, (object)array('nid' => $nid));
277 277
             }
278 278
           }
279 279
         }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
           // Multiple values formatter.
282 282
           $output = content_format($field, $items, $formatter_name, $values);
283 283
           if (!empty($output)) {
284
-            $rendered[] = $this->render_link($output, (object) array('nid' => $nid));
284
+            $rendered[] = $this->render_link($output, (object)array('nid' => $nid));
285 285
           }
286 286
         }
287 287
 
@@ -307,11 +307,11 @@  discard block
 block discarded – undo
307 307
       if (method_exists('render_as_link', 'views_handler_field')) {
308 308
         // Views 2.3+
309 309
         $this->options['alter']['make_link'] = TRUE;
310
-        $this->options['alter']['path'] = "node/" . $values->{$this->aliases['nid']};
310
+        $this->options['alter']['path'] = "node/".$values->{$this->aliases['nid']};
311 311
       }
312 312
       else {
313 313
         // Views up to 2.2
314
-        return l($data, "node/" . $values->nid, array('html' => TRUE));
314
+        return l($data, "node/".$values->nid, array('html' => TRUE));
315 315
       }
316 316
     }
317 317
     else {
Please login to merge, or discard this patch.
contrib/cck/includes/views/handlers/content_plugin_display_simple.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     }
37 37
     elseif ($options['ids']) {
38 38
       $alias = $this->view->query->ensure_table($options['table']);
39
-      $this->view->query->add_where(NULL, "$alias.$options[field_id] IN (" . db_placeholders($options['ids']) . ')', $options['ids']);
39
+      $this->view->query->add_where(NULL, "$alias.$options[field_id] IN (".db_placeholders($options['ids']).')', $options['ids']);
40 40
     }
41 41
   }
42 42
 }
Please login to merge, or discard this patch.
boinc/modules/contrib/cck/includes/views/handlers/content_handler_field.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
       $item[$column] = $values->{$this->aliases[$attributes['column']]};
209 209
     }
210 210
 
211
-    $item['#delta'] = $field['multiple'] ?  $values->{$this->aliases['delta']} : 0;
211
+    $item['#delta'] = $field['multiple'] ? $values->{$this->aliases['delta']} : 0;
212 212
 
213 213
     // Render items.
214 214
     $formatter_name = $options['format'];
Please login to merge, or discard this patch.