Completed
Pull Request — master (#2190)
by Christian
14:01
created
default/boinc/modules/contrib/cck/modules/fieldgroup/fieldgroup.module 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * Implementation of hook_init().
17 17
  */
18 18
 function fieldgroup_init() {
19
-  drupal_add_css(drupal_get_path('module', 'fieldgroup') .'/fieldgroup.css');
19
+  drupal_add_css(drupal_get_path('module', 'fieldgroup').'/fieldgroup.css');
20 20
 }
21 21
 
22 22
 /**
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  */
25 25
 function fieldgroup_ctools_plugin_directory($module, $plugin) {
26 26
   if ($module == 'ctools' && $plugin == 'content_types') {
27
-    return 'panels/' . $plugin;
27
+    return 'panels/'.$plugin;
28 28
   }
29 29
 }
30 30
 
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
       $type_name = $type->type;
42 42
       $content_type = content_types($type_name);
43 43
       $type_url_str = $content_type['url_str'];
44
-      $items['admin/content/node-type/'. $type_url_str .'/groups/%'] = array(
44
+      $items['admin/content/node-type/'.$type_url_str.'/groups/%'] = array(
45 45
         'title' => 'Edit group',
46 46
         'page callback' => 'drupal_get_form',
47 47
         'page arguments' => array('fieldgroup_group_edit_form', $type_name, 5),
48 48
         'access arguments' => array('administer content types'),
49 49
         'type' => MENU_CALLBACK,
50 50
       );
51
-      $items['admin/content/node-type/'. $type_url_str .'/groups/%/remove'] = array(
51
+      $items['admin/content/node-type/'.$type_url_str.'/groups/%/remove'] = array(
52 52
         'title' => 'Edit group',
53 53
         'page callback' => 'drupal_get_form',
54 54
         'page arguments' => array('fieldgroup_remove_group', $type_name, 5),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 function fieldgroup_content_fieldapi($op, $field) {
95 95
   switch ($op) {
96 96
     case 'delete instance':
97
-      db_query("DELETE FROM {". fieldgroup_fields_tablename() ."} WHERE field_name = '%s' AND type_name = '%s'", $field['field_name'], $field['type_name']);
97
+      db_query("DELETE FROM {".fieldgroup_fields_tablename()."} WHERE field_name = '%s' AND type_name = '%s'", $field['field_name'], $field['type_name']);
98 98
       cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
99 99
       break;
100 100
   }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
   $form_values = $form_state['values'];
183 183
   $content_type = $form['#content_type'];
184 184
   fieldgroup_save_group($content_type['type'], $form_values);
185
-  $form_state['redirect'] = 'admin/content/node-type/'. $content_type['url_str'] .'/fields';
185
+  $form_state['redirect'] = 'admin/content/node-type/'.$content_type['url_str'].'/fields';
186 186
 }
187 187
 
188 188
 function fieldgroup_remove_group(&$form_state, $type_name, $group_name) {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
   return confirm_form($form,
203 203
                   t('Are you sure you want to remove the group %label?',
204 204
                   array('%label' => t($group['label']))),
205
-                  'admin/content/node-type/'. $content_type['url_str'] .'/fields', t('This action cannot be undone.'),
205
+                  'admin/content/node-type/'.$content_type['url_str'].'/fields', t('This action cannot be undone.'),
206 206
                   t('Remove'), t('Cancel'));
207 207
 }
208 208
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
   $group_name = $form['#group_name'];
213 213
   fieldgroup_delete($content_type['type'], $group_name);
214 214
   drupal_set_message(t('The group %group_name has been removed.', array('%group_name' => $group_name)));
215
-  $form_state['redirect'] = 'admin/content/node-type/'. $content_type['url_str'] .'/fields';
215
+  $form_state['redirect'] = 'admin/content/node-type/'.$content_type['url_str'].'/fields';
216 216
 }
217 217
 
218 218
 /**
@@ -222,13 +222,13 @@  discard block
 block discarded – undo
222 222
   global $language;
223 223
   static $groups, $groups_sorted;
224 224
   if (!isset($groups) || $reset) {
225
-    if ($cached = cache_get('fieldgroup_data:'. $language->language, content_cache_tablename())) {
225
+    if ($cached = cache_get('fieldgroup_data:'.$language->language, content_cache_tablename())) {
226 226
       $data = $cached->data;
227 227
       $groups = $data['groups'];
228 228
       $groups_sorted = $data['groups_sorted'];
229 229
     }
230 230
     else {
231
-      $result = db_query("SELECT * FROM {". fieldgroup_tablename() ."} ORDER BY weight, group_name");
231
+      $result = db_query("SELECT * FROM {".fieldgroup_tablename()."} ORDER BY weight, group_name");
232 232
       $groups = array();
233 233
       $groups_sorted = array();
234 234
       while ($group = db_fetch_array($result)) {
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
         $groups_sorted[$group['type_name']][] = &$groups[$group['type_name']][$group['group_name']];
251 251
       }
252 252
       //load fields
253
-      $result = db_query("SELECT nfi.*, ng.group_name FROM {". fieldgroup_tablename() ."} ng ".
254
- "INNER JOIN {". fieldgroup_fields_tablename() ."} ngf ON ngf.type_name = ng.type_name AND ngf.group_name = ng.group_name ".
255
- "INNER JOIN {". content_instance_tablename() ."} nfi ON nfi.field_name = ngf.field_name AND nfi.type_name = ngf.type_name ".
253
+      $result = db_query("SELECT nfi.*, ng.group_name FROM {".fieldgroup_tablename()."} ng ".
254
+ "INNER JOIN {".fieldgroup_fields_tablename()."} ngf ON ngf.type_name = ng.type_name AND ngf.group_name = ng.group_name ".
255
+ "INNER JOIN {".content_instance_tablename()."} nfi ON nfi.field_name = ngf.field_name AND nfi.type_name = ngf.type_name ".
256 256
  "WHERE nfi.widget_active = 1 ORDER BY nfi.weight");
257 257
       while ($field = db_fetch_array($result)) {
258 258
         // Allow external modules to translate field strings.
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
         $groups[$field['type_name']][$field['group_name']]['fields'][$field['field_name']] = $field;
268 268
       }
269
-      cache_set('fieldgroup_data:'. $language->language, array('groups' => $groups, 'groups_sorted' => $groups_sorted), content_cache_tablename());
269
+      cache_set('fieldgroup_data:'.$language->language, array('groups' => $groups, 'groups_sorted' => $groups_sorted), content_cache_tablename());
270 270
     }
271 271
   }
272 272
   if (empty($content_type)) {
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 function _fieldgroup_groups_label($content_type) {
283 283
   $groups = fieldgroup_groups($content_type);
284 284
 
285
-  $labels[''] = '<'. t('none') .'>';
285
+  $labels[''] = '<'.t('none').'>';
286 286
   foreach ($groups as $group_name => $group) {
287 287
     $labels[$group_name] = t($group['label']);
288 288
   }
@@ -290,14 +290,14 @@  discard block
 block discarded – undo
290 290
 }
291 291
 
292 292
 function _fieldgroup_field_get_group($content_type, $field_name) {
293
-  return db_result(db_query("SELECT group_name FROM {". fieldgroup_fields_tablename() ."} WHERE type_name = '%s' AND field_name = '%s'", $content_type, $field_name));
293
+  return db_result(db_query("SELECT group_name FROM {".fieldgroup_fields_tablename()."} WHERE type_name = '%s' AND field_name = '%s'", $content_type, $field_name));
294 294
 }
295 295
 
296 296
 /**
297 297
  * Implementation of hook_form_alter()
298 298
  */
299 299
 function fieldgroup_form_alter(&$form, $form_state, $form_id) {
300
-  if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) {
300
+  if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'].'_node_form' == $form_id) {
301 301
     foreach (fieldgroup_groups($form['type']['#value']) as $group_name => $group) {
302 302
       $form[$group_name] = array(
303 303
         '#type' => 'fieldset',
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
       // Can't use module_invoke_all because we want
335 335
       // to be able to use a reference to $form and $form_state.
336 336
       foreach (module_implements('fieldgroup_form') as $module) {
337
-        $function = $module .'_fieldgroup_form';
337
+        $function = $module.'_fieldgroup_form';
338 338
         $function($form, $form_state, $form_id, $group);
339 339
       }
340 340
 
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 
390 390
     // Add the 'group_' prefix.
391 391
     if (substr($group_name, 0, 6) != 'group_') {
392
-      $group_name = 'group_'. $group_name;
392
+      $group_name = 'group_'.$group_name;
393 393
     }
394 394
 
395 395
     // Invalid field name.
@@ -422,10 +422,10 @@  discard block
 block discarded – undo
422 422
       foreach ($validation['errors'] as $type => $messages) {
423 423
         foreach ($messages as $message) {
424 424
           if ($type == 'label') {
425
-            form_set_error('_add_new_group][label', t('Add new group:') .' '. $message);
425
+            form_set_error('_add_new_group][label', t('Add new group:').' '.$message);
426 426
           }
427 427
           else {
428
-            form_set_error('_add_new_group][group_name', t('Add new group:') .' '. $message);
428
+            form_set_error('_add_new_group][group_name', t('Add new group:').' '.$message);
429 429
           }
430 430
         }
431 431
       }
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
     // If 'group' row:  update groups weights
491 491
     // (possible newly created group has already been taken care of).
492 492
     elseif (in_array($key, $form['#groups'])) {
493
-      db_query("UPDATE {". fieldgroup_tablename() ."} SET weight = %d WHERE type_name = '%s' AND group_name = '%s'",
493
+      db_query("UPDATE {".fieldgroup_tablename()."} SET weight = %d WHERE type_name = '%s' AND group_name = '%s'",
494 494
         $values['weight'], $type_name, $key);
495 495
     }
496 496
   }
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
   // - when a (non last) field is removed from a group, a 'ghost row' remains in the fields overview
533 533
   // - when the last field is removed, the group disappears
534 534
   // seems to be fixed when emptying the cache.
535
-  db_query("DELETE FROM {". fieldgroup_fields_tablename() ."} WHERE type_name = '%s' AND field_name = '%s'", $form_values['type_name'], $form_values['field_name']);
535
+  db_query("DELETE FROM {".fieldgroup_fields_tablename()."} WHERE type_name = '%s' AND field_name = '%s'", $form_values['type_name'], $form_values['field_name']);
536 536
 }
537 537
 
538 538
 /**
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
       $element['#collapsible'] = TRUE;
606 606
     case 'fieldset':
607 607
       $element['#type'] = 'fieldgroup_fieldset';
608
-      $element['#attributes'] = array('class' => 'fieldgroup '. strtr($group['group_name'], '_', '-'));
608
+      $element['#attributes'] = array('class' => 'fieldgroup '.strtr($group['group_name'], '_', '-'));
609 609
       break;
610 610
   }
611 611
   foreach ($group['fields'] as $field_name => $field) {
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
   // Can't use module_invoke_all because we want
619 619
   // to be able to use a reference to $node and $element.
620 620
   foreach (module_implements('fieldgroup_view') as $module) {
621
-    $function = $module .'_fieldgroup_view';
621
+    $function = $module.'_fieldgroup_view';
622 622
     $function($node, $element, $group, $context);
623 623
   }
624 624
 
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 
696 696
       // One-field equivalent to _content_field_invoke('sanitize').
697 697
       $module = $field_types[$field['type']]['module'];
698
-      $function = $module .'_field';
698
+      $function = $module.'_field';
699 699
       if (function_exists($function)) {
700 700
         $function('sanitize', $node_copy, $field, $items, $teaser, $page);
701 701
         $node_copy->{$field_name} = $items;
@@ -755,13 +755,13 @@  discard block
 block discarded – undo
755 755
 function fieldgroup_node_type($op, $info) {
756 756
   if ($op == 'update' && !empty($info->old_type) && $info->type != $info->old_type) {
757 757
     // update the tables
758
-    db_query("UPDATE {". fieldgroup_tablename() ."} SET type_name='%s' WHERE type_name='%s'", array($info->type, $info->old_type));
759
-    db_query("UPDATE {". fieldgroup_fields_tablename() ."} SET type_name='%s' WHERE type_name='%s'", array($info->type, $info->old_type));
758
+    db_query("UPDATE {".fieldgroup_tablename()."} SET type_name='%s' WHERE type_name='%s'", array($info->type, $info->old_type));
759
+    db_query("UPDATE {".fieldgroup_fields_tablename()."} SET type_name='%s' WHERE type_name='%s'", array($info->type, $info->old_type));
760 760
     cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
761 761
   }
762 762
   elseif ($op == 'delete') {
763
-    db_query("DELETE FROM {". fieldgroup_tablename() ."} WHERE type_name = '%s'", $info->type);
764
-    db_query("DELETE FROM {". fieldgroup_fields_tablename() ."} WHERE type_name = '%s'", $info->type);
763
+    db_query("DELETE FROM {".fieldgroup_tablename()."} WHERE type_name = '%s'", $info->type);
764
+    db_query("DELETE FROM {".fieldgroup_fields_tablename()."} WHERE type_name = '%s'", $info->type);
765 765
   }
766 766
 }
767 767
 
@@ -800,19 +800,19 @@  discard block
 block discarded – undo
800 800
 
801 801
   // Allow other modules to intervene when the group is saved.
802 802
   foreach (module_implements('fieldgroup_save_group') as $module) {
803
-    $function = $module .'_fieldgroup_save_group';
803
+    $function = $module.'_fieldgroup_save_group';
804 804
     $function($group);
805 805
   }
806 806
 
807 807
   if (!isset($groups[$group['group_name']])) {
808 808
     // Accept group name from programmed submissions if valid.
809
-    db_query("INSERT INTO {". fieldgroup_tablename() ."} (group_type, type_name, group_name, label, settings, weight)".
809
+    db_query("INSERT INTO {".fieldgroup_tablename()."} (group_type, type_name, group_name, label, settings, weight)".
810 810
       " VALUES ('%s', '%s', '%s', '%s', '%s', %d)", $group['group_type'], $type_name, $group['group_name'], $group['label'], serialize($group['settings']), $group['weight']);
811 811
     cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
812 812
     return SAVED_NEW;
813 813
   }
814 814
   else {
815
-    db_query("UPDATE {". fieldgroup_tablename() ."} SET group_type = '%s', label = '%s', settings = '%s', weight = %d ".
815
+    db_query("UPDATE {".fieldgroup_tablename()."} SET group_type = '%s', label = '%s', settings = '%s', weight = %d ".
816 816
              "WHERE type_name = '%s' AND group_name = '%s'",
817 817
              $group['group_type'], $group['label'], serialize($group['settings']), $group['weight'], $type_name, $group['group_name']);
818 818
     cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
@@ -825,21 +825,21 @@  discard block
 block discarded – undo
825 825
 
826 826
   if ($default != $form_values['group']) {
827 827
     if ($form_values['group'] && !$default) {
828
-      db_query("INSERT INTO {". fieldgroup_fields_tablename() ."} (type_name, group_name, field_name) VALUES ('%s', '%s', '%s')", $form_values['type_name'], $form_values['group'], $form_values['field_name']);
828
+      db_query("INSERT INTO {".fieldgroup_fields_tablename()."} (type_name, group_name, field_name) VALUES ('%s', '%s', '%s')", $form_values['type_name'], $form_values['group'], $form_values['field_name']);
829 829
     }
830 830
     elseif ($form_values['group']) {
831
-      db_query("UPDATE {". fieldgroup_fields_tablename() ."} SET group_name = '%s' WHERE type_name = '%s' AND field_name = '%s'", $form_values['group'], $form_values['type_name'], $form_values['field_name']);
831
+      db_query("UPDATE {".fieldgroup_fields_tablename()."} SET group_name = '%s' WHERE type_name = '%s' AND field_name = '%s'", $form_values['group'], $form_values['type_name'], $form_values['field_name']);
832 832
     }
833 833
     else {
834
-      db_query("DELETE FROM {". fieldgroup_fields_tablename() ."} WHERE type_name = '%s' AND field_name = '%s'", $form_values['type_name'], $form_values['field_name']);
834
+      db_query("DELETE FROM {".fieldgroup_fields_tablename()."} WHERE type_name = '%s' AND field_name = '%s'", $form_values['type_name'], $form_values['field_name']);
835 835
     }
836 836
     cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
837 837
   }
838 838
 }
839 839
 
840 840
 function fieldgroup_delete($content_type, $group_name) {
841
-  db_query("DELETE FROM {". fieldgroup_tablename() ."} WHERE  type_name = '%s' AND group_name = '%s'", $content_type, $group_name);
842
-  db_query("DELETE FROM {". fieldgroup_fields_tablename() ."} WHERE  type_name = '%s' AND group_name = '%s'", $content_type, $group_name);
841
+  db_query("DELETE FROM {".fieldgroup_tablename()."} WHERE  type_name = '%s' AND group_name = '%s'", $content_type, $group_name);
842
+  db_query("DELETE FROM {".fieldgroup_fields_tablename()."} WHERE  type_name = '%s' AND group_name = '%s'", $content_type, $group_name);
843 843
   cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
844 844
 }
845 845
 
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
       $element['#attributes']['class'] .= ' collapsed';
866 866
     }
867 867
   }
868
-  return '<fieldset'. drupal_attributes($element['#attributes']) .'>'. ($element['#title'] ? '<legend>'. $element['#title'] .'</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">'. $element['#description'] .'</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . (isset($element['#value']) ? $element['#value'] : '') ."</fieldset>\n";
868
+  return '<fieldset'.drupal_attributes($element['#attributes']).'>'.($element['#title'] ? '<legend>'.$element['#title'].'</legend>' : '').(isset($element['#description']) && $element['#description'] ? '<div class="description">'.$element['#description'].'</div>' : '').(!empty($element['#children']) ? $element['#children'] : '').(isset($element['#value']) ? $element['#value'] : '')."</fieldset>\n";
869 869
 }
870 870
 
871 871
 
@@ -886,14 +886,14 @@  discard block
 block discarded – undo
886 886
 
887 887
   $vars['group_name'] = $element['#group_name'];
888 888
   $vars['group_name_css'] = strtr($element['#group_name'], '_', '-');
889
-  $vars['label'] = isset($element['#title']) ? $element['#title'] : '';;
890
-  $vars['description'] = isset($element['#description']) ? $element['#description'] : '';;
889
+  $vars['label'] = isset($element['#title']) ? $element['#title'] : ''; ;
890
+  $vars['description'] = isset($element['#description']) ? $element['#description'] : ''; ;
891 891
   $vars['content'] = isset($element['#children']) ? $element['#children'] : '';
892 892
   $vars['template_files'] = array(
893 893
     'fieldgroup-simple-',
894
-    'fieldgroup-simple-'. $element['#group_name'],
895
-    'fieldgroup-simple-'. $element['#node']->type,
896
-    'fieldgroup-simple-'. $element['#group_name'] .'-'. $element['#node']->type,
894
+    'fieldgroup-simple-'.$element['#group_name'],
895
+    'fieldgroup-simple-'.$element['#node']->type,
896
+    'fieldgroup-simple-'.$element['#group_name'].'-'.$element['#node']->type,
897 897
   );
898 898
 }
899 899
 
@@ -908,6 +908,6 @@  discard block
 block discarded – undo
908 908
 
909 909
   foreach (fieldgroup_groups($node->type) as $group_name => $group) {
910 910
     // '#chilren' might not be set if the group is empty.
911
-    $vars[$group_name .'_rendered'] = isset($node->content[$group_name]['#children']) ? $node->content[$group_name]['#children'] : '';
911
+    $vars[$group_name.'_rendered'] = isset($node->content[$group_name]['#children']) ? $node->content[$group_name]['#children'] : '';
912 912
   }
913 913
 }
Please login to merge, or discard this patch.
boinc/modules/contrib/cck/modules/nodereference/nodereference.module 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
  */
58 58
 function nodereference_ctools_plugin_directory($module, $plugin) {
59 59
   if ($module == 'ctools' && $plugin == 'relationships') {
60
-    return 'panels/' . $plugin;
60
+    return 'panels/'.$plugin;
61 61
   }
62 62
 }
63 63
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             '#title' => t('View used to select the nodes'),
116 116
             '#options' => $views,
117 117
             '#default_value' => isset($field['advanced_view']) ? $field['advanced_view'] : '--',
118
-            '#description' => t('<p>Choose the "Views module" view that selects the nodes that can be referenced.<br />Note:</p>') .
118
+            '#description' => t('<p>Choose the "Views module" view that selects the nodes that can be referenced.<br />Note:</p>').
119 119
               t('<ul><li>Only views that have fields will work for this purpose.</li><li>This will discard the "Content types" settings above. Use the view\'s "filters" section instead.</li><li>Use the view\'s "fields" section to display additional informations about candidate nodes on node creation/edition form.</li><li>Use the view\'s "sort criteria" section to determine the order in which candidate nodes will be displayed.</li></ul>'),
120 120
           );
121 121
           $form['advanced']['advanced_view_args'] = array(
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         }
129 129
         else {
130 130
           $form['advanced']['no_view_help'] = array(
131
-            '#value' => t('<p>The list of nodes that can be referenced can be based on a "Views module" view but no appropriate views were found. <br />Note:</p>') .
131
+            '#value' => t('<p>The list of nodes that can be referenced can be based on a "Views module" view but no appropriate views were found. <br />Note:</p>').
132 132
               t('<ul><li>Only views that have fields will work for this purpose.</li><li>This will discard the "Content types" settings above. Use the view\'s "filters" section instead.</li><li>Use the view\'s "fields" section to display additional informations about candidate nodes on node creation/edition form.</li><li>Use the view\'s "sort criteria" section to determine the order in which candidate nodes will be displayed.</li></ul>'),
133 133
           );
134 134
         }
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
       $table_alias = content_views_tablename($field);
156 156
 
157 157
       // Filter: swap the handler to the 'in' operator.
158
-      $data[$table_alias][$field['field_name'] .'_nid']['filter']['handler'] = 'content_handler_filter_many_to_one';
158
+      $data[$table_alias][$field['field_name'].'_nid']['filter']['handler'] = 'content_handler_filter_many_to_one';
159 159
       // Argument: use node.title for summaries.
160 160
       $data["node_$table_alias"]['table']['join']['node'] = array(
161 161
         'table' => 'node',
162 162
         'field' => 'nid',
163 163
         'left_table' => $table_alias,
164
-        'left_field' => $field['field_name'] .'_nid',
164
+        'left_field' => $field['field_name'].'_nid',
165 165
       );
166
-      $data[$table_alias][$field['field_name'] .'_nid']['argument']['handler'] = 'content_handler_argument_reference';
167
-      $data[$table_alias][$field['field_name'] .'_nid']['argument']['name table'] = "node_$table_alias";
168
-      $data[$table_alias][$field['field_name'] .'_nid']['argument']['name field'] = 'title';
166
+      $data[$table_alias][$field['field_name'].'_nid']['argument']['handler'] = 'content_handler_argument_reference';
167
+      $data[$table_alias][$field['field_name'].'_nid']['argument']['name table'] = "node_$table_alias";
168
+      $data[$table_alias][$field['field_name'].'_nid']['argument']['name field'] = 'title';
169 169
       // Relationship: add a relationship for related node.
170
-      $data[$table_alias][$field['field_name'] .'_nid']['relationship'] = array(
170
+      $data[$table_alias][$field['field_name'].'_nid']['relationship'] = array(
171 171
         'base' => 'node',
172 172
         'field' => $db_info['columns']['nid']['column'],
173 173
         'handler' => 'content_handler_relationship',
@@ -255,11 +255,11 @@  discard block
 block discarded – undo
255 255
         // this page request.
256 256
         $missing_ids = array_diff($ids, array_keys($sanitized_nodes));
257 257
         if (!empty($missing_ids)) {
258
-          $where = array('n.nid in ('. db_placeholders($missing_ids) . ')');
258
+          $where = array('n.nid in ('.db_placeholders($missing_ids).')');
259 259
           if (!user_access('administer nodes')) {
260 260
             $where[] = 'n.status = 1';
261 261
           }
262
-          $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, n.status FROM {node} n WHERE '. implode(' AND ', $where)), $missing_ids);
262
+          $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, n.status FROM {node} n WHERE '.implode(' AND ', $where)), $missing_ids);
263 263
           while ($row = db_fetch_array($result)) {
264 264
             $sanitized_nodes[$row['nid']] = $row;
265 265
           }
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
 function theme_nodereference_formatter_default($element) {
319 319
   $output = '';
320 320
   if (!empty($element['#item']['safe']['nid'])) {
321
-    $output = l($element['#item']['safe']['title'], 'node/'. $element['#item']['safe']['nid']);
321
+    $output = l($element['#item']['safe']['title'], 'node/'.$element['#item']['safe']['nid']);
322 322
     if (!$element['#item']['safe']['status']) {
323
-      $output = '<span class="node-unpublished"> '. t('(Unpublished)') ." $output</span>";
323
+      $output = '<span class="node-unpublished"> '.t('(Unpublished)')." $output</span>";
324 324
     }
325 325
   }
326 326
   return $output;
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
   if (!empty($element['#item']['safe']['nid'])) {
335 335
     $output = check_plain($element['#item']['safe']['title']);
336 336
     if (!$element['#item']['safe']['status']) {
337
-      $output = '<span class="node-unpublished"> '. t('(Unpublished)') ." $output</span>";
337
+      $output = '<span class="node-unpublished"> '.t('(Unpublished)')." $output</span>";
338 338
     }
339 339
   }
340 340
   return $output;
@@ -563,11 +563,11 @@  discard block
 block discarded – undo
563 563
  * Substitute in the node title for the node nid.
564 564
  */
565 565
 function nodereference_autocomplete_value($element, $edit = FALSE) {
566
-  $field_key  = $element['#columns'][0];
566
+  $field_key = $element['#columns'][0];
567 567
   if (!empty($element['#default_value'][$field_key])) {
568 568
     $nid = $element['#default_value'][$field_key];
569 569
     $value = db_result(db_query(db_rewrite_sql('SELECT n.title FROM {node} n WHERE n.nid = %d'), $nid));
570
-    $value .= ' [nid:'. $nid .']';
570
+    $value .= ' [nid:'.$nid.']';
571 571
     return array($field_key => $value);
572 572
   }
573 573
   return array($field_key => NULL);
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
   // element, it can wrap around the optionwidgets_select element.
587 587
   // This will create a new, nested instance of the field.
588 588
   // Add a validation step where the value can be unwrapped.
589
-  $field_key  = $element['#columns'][0];
589
+  $field_key = $element['#columns'][0];
590 590
   $element[$field_key] = array(
591 591
     '#type' => 'optionwidgets_select',
592 592
     '#default_value' => isset($element['#value']) ? $element['#value'] : '',
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
   // element, it can wrap around the optionwidgets_select element.
621 621
   // This will create a new, nested instance of the field.
622 622
   // Add a validation step where the value can be unwrapped.
623
-  $field_key  = $element['#columns'][0];
623
+  $field_key = $element['#columns'][0];
624 624
   $element[$field_key] = array(
625 625
     '#type' => 'optionwidgets_buttons',
626 626
     '#default_value' => isset($element['#value']) ? $element['#value'] : '',
@@ -654,12 +654,12 @@  discard block
 block discarded – undo
654 654
   // element, it can wrap around the text_textfield element and add an autocomplete
655 655
   // path and some extra processing to it.
656 656
   // Add a validation step where the value can be unwrapped.
657
-  $field_key  = $element['#columns'][0];
657
+  $field_key = $element['#columns'][0];
658 658
 
659 659
   $element[$field_key] = array(
660 660
     '#type' => 'text_textfield',
661 661
     '#default_value' => isset($element['#value']) ? $element['#value'] : '',
662
-    '#autocomplete_path' => 'nodereference/autocomplete/'. $element['#field_name'],
662
+    '#autocomplete_path' => 'nodereference/autocomplete/'.$element['#field_name'],
663 663
     // The following values were set by the content module and need
664 664
     // to be passed down to the nested element.
665 665
     '#title' => $element['#title'],
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
  * like optionwidgets are using #element_validate to alter the value.
698 698
  */
699 699
 function nodereference_optionwidgets_validate($element, &$form_state) {
700
-  $field_key  = $element['#columns'][0];
700
+  $field_key = $element['#columns'][0];
701 701
 
702 702
   $value = $form_state['values'];
703 703
   $new_parents = array();
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
   static $results = array();
806 806
 
807 807
   // Create unique id for static cache.
808
-  $cid = $field['field_name'] .':'. $match .':'. ($string !== '' ? $string : implode('-', $ids)) .':'. $limit;
808
+  $cid = $field['field_name'].':'.$match.':'.($string !== '' ? $string : implode('-', $ids)).':'.$limit;
809 809
   if (!isset($results[$cid])) {
810 810
     $references = FALSE;
811 811
     if (module_exists('views') && !empty($field['advanced_view']) && $field['advanced_view'] != '--') {
@@ -931,15 +931,15 @@  discard block
 block discarded – undo
931 931
       'equals' => "= '%s'",
932 932
       'starts_with' => "$like '%s%%'",
933 933
     );
934
-    $where[] = 'n.title '. (isset($match_clauses[$match]) ? $match_clauses[$match] : $match_clauses['contains']);
934
+    $where[] = 'n.title '.(isset($match_clauses[$match]) ? $match_clauses[$match] : $match_clauses['contains']);
935 935
     $args[] = $string;
936 936
   }
937 937
   elseif ($ids) {
938
-    $where[] = 'n.nid IN (' . db_placeholders($ids) . ')';
938
+    $where[] = 'n.nid IN ('.db_placeholders($ids).')';
939 939
     $args = array_merge($args, $ids);
940 940
   }
941 941
 
942
-  $where_clause = $where ? 'WHERE ('. implode(') AND (', $where) .')' : '';
942
+  $where_clause = $where ? 'WHERE ('.implode(') AND (', $where).')' : '';
943 943
   $sql = db_rewrite_sql("SELECT n.nid, n.title AS node_title, n.type AS node_type FROM {node} n $where_clause ORDER BY n.title, n.type");
944 944
   $result = $limit ? db_query_range($sql, $args, 0, $limit) : db_query($sql, $args);
945 945
   $references = array();
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
   $references = _nodereference_potential_references($field, $string, $match, array(), 10);
976 976
   foreach ($references as $id => $row) {
977 977
     // Add a class wrapper for a few required CSS overrides.
978
-    $matches[$row['title'] ." [nid:$id]"] = '<div class="reference-autocomplete">'. $row['rendered'] . '</div>';
978
+    $matches[$row['title']." [nid:$id]"] = '<div class="reference-autocomplete">'.$row['rendered'].'</div>';
979 979
   }
980 980
   drupal_json($matches);
981 981
 }
@@ -1024,9 +1024,9 @@  discard block
 block discarded – undo
1024 1024
     $node = $vars['node'];
1025 1025
     $field = $node->referencing_field;
1026 1026
     $vars['template_files'][] = 'node-nodereference';
1027
-    $vars['template_files'][] = 'node-nodereference-'. $field['field_name'];
1028
-    $vars['template_files'][] = 'node-nodereference-'. $node->type;
1029
-    $vars['template_files'][] = 'node-nodereference-'. $field['field_name'] .'-'. $node->type;
1027
+    $vars['template_files'][] = 'node-nodereference-'.$field['field_name'];
1028
+    $vars['template_files'][] = 'node-nodereference-'.$node->type;
1029
+    $vars['template_files'][] = 'node-nodereference-'.$field['field_name'].'-'.$node->type;
1030 1030
   }
1031 1031
 }
1032 1032
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/cck/modules/number/number.module 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $form['allowed_values_fieldset']['advanced_options']['markup_allowed_values_php'] = array(
139 139
           '#type' => 'item',
140 140
           '#title' => t('Code'),
141
-          '#value' => !empty($field['allowed_values_php']) ? '<code>'. check_plain($field['allowed_values_php']) .'</code>' : t('&lt;none&gt;'),
141
+          '#value' => !empty($field['allowed_values_php']) ? '<code>'.check_plain($field['allowed_values_php']).'</code>' : t('&lt;none&gt;'),
142 142
           '#description' => empty($field['allowed_values_php']) ? t("You're not allowed to input PHP code.") : t('This PHP code was set by an administrator and will override the allowed values list above.'),
143 143
         );
144 144
       }
@@ -178,15 +178,15 @@  discard block
 block discarded – undo
178 178
         $table_alias = content_views_tablename($field);
179 179
 
180 180
         // Filter: Add a 'many to one' filter.
181
-        $copy = $data[$table_alias][$field['field_name'] .'_value'];
181
+        $copy = $data[$table_alias][$field['field_name'].'_value'];
182 182
         $copy['title'] = t('@label (!name) - Allowed values', array('@label' => t($field['widget']['label']), '!name' => $field['field_name']));
183 183
         $copy['filter']['handler'] = 'content_handler_filter_many_to_one';
184 184
         $copy['filter']['numeric'] = TRUE;
185 185
         unset($copy['field'], $copy['argument'], $copy['sort']);
186
-        $data[$table_alias][$field['field_name'] .'_value_many_to_one'] = $copy;
186
+        $data[$table_alias][$field['field_name'].'_value_many_to_one'] = $copy;
187 187
         // Argument: swap the handler to the 'many to one' operator
188
-        $data[$table_alias][$field['field_name'] .'_value']['argument']['handler'] = 'content_handler_argument_many_to_one';
189
-        $data[$table_alias][$field['field_name'] .'_value']['argument']['numeric'] = TRUE;
188
+        $data[$table_alias][$field['field_name'].'_value']['argument']['handler'] = 'content_handler_argument_many_to_one';
189
+        $data[$table_alias][$field['field_name'].'_value']['argument']['numeric'] = TRUE;
190 190
         return $data;
191 191
       }
192 192
       break;
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
               // stored as strings, and we need to compare numeric equality.
231 231
               $valid = FALSE;
232 232
               foreach ($allowed_values as $kay => $value) {
233
-                if ((float) $item['value'] == (float) $kay) {
233
+                if ((float)$item['value'] == (float)$kay) {
234 234
                   $valid = TRUE;
235 235
                   break;
236 236
                 }
@@ -261,16 +261,16 @@  discard block
 block discarded – undo
261 261
  */
262 262
 function number_field_formatter_info() {
263 263
   return array(
264
-    'default' => array('label' => '9999',            'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
265
-    'us_0'    => array('label' => '9,999',           'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
266
-    'us_1'    => array('label' => '9,999.9',         'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
267
-    'us_2'    => array('label' => '9,999.99',        'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
268
-    'be_0'    => array('label' => '9.999',           'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
269
-    'be_1'    => array('label' => '9.999,9',         'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
270
-    'be_2'    => array('label' => '9.999,99',        'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
271
-    'fr_0'    => array('label' => '9 999',           'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
272
-    'fr_1'    => array('label' => '9 999, 9',        'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
273
-    'fr_2'    => array('label' => '9 999, 99',       'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
264
+    'default' => array('label' => '9999', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
265
+    'us_0'    => array('label' => '9,999', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
266
+    'us_1'    => array('label' => '9,999.9', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
267
+    'us_2'    => array('label' => '9,999.99', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
268
+    'be_0'    => array('label' => '9.999', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
269
+    'be_1'    => array('label' => '9.999,9', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
270
+    'be_2'    => array('label' => '9.999,99', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
271
+    'fr_0'    => array('label' => '9 999', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
272
+    'fr_1'    => array('label' => '9 999, 9', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
273
+    'fr_2'    => array('label' => '9 999, 99', 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_decimal', 'number_float')),
274 274
     'unformatted' => array('label' => t('unformatted'), 'multiple values' => CONTENT_HANDLE_CORE, 'field types' => array('number_integer', 'number_decimal', 'number_float')),
275 275
   );
276 276
 }
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
   $prefix = (count($prefixes) > 1) ? format_plural($value, $prefixes[0], $prefixes[1]) : $prefixes[0];
338 338
   $suffix = (count($suffixes) > 1) ? format_plural($value, $suffixes[0], $suffixes[1]) : $suffixes[0];
339 339
 
340
-  return $prefix . $output . $suffix;
340
+  return $prefix.$output.$suffix;
341 341
 }
342 342
 
343 343
 /**
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
     $start = $value;
513 513
     $value = preg_replace('@[^-0-9\.]@', '', $value);
514 514
     if ($start != $value) {
515
-      $error_field = implode('][', $element['#parents']) .']['. $field_key;
515
+      $error_field = implode('][', $element['#parents']).']['.$field_key;
516 516
       form_set_error($error_field, t('Only numbers and decimals are allowed in %field.', array('%field' => t($field['widget']['label']))));
517 517
     }
518 518
     else {
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
     $start = $value;
536 536
     $value = preg_replace('@[^-0-9]@', '', $value);
537 537
     if ($start != $value) {
538
-      $error_field = implode('][', $element['#parents']) .']['. $field_key;
538
+      $error_field = implode('][', $element['#parents']).']['.$field_key;
539 539
       form_set_error($error_field, t('Only numbers are allowed in %field.', array('%field' => t($field['widget']['label']))));
540 540
     }
541 541
     else {
@@ -557,9 +557,9 @@  discard block
 block discarded – undo
557 557
   if (($element[$field_key]['#required'] || !empty($value))) {
558 558
     $decimal = $element['#decimal'] ? $element['#decimal'] : '.';
559 559
     $start = $value;
560
-    $value = preg_replace('@[^-0-9\\'. $decimal .']@', '', $value);
560
+    $value = preg_replace('@[^-0-9\\'.$decimal.']@', '', $value);
561 561
     if ($start != $value) {
562
-      $error_field = implode('][', $element['#parents']) .']['. $field_key;
562
+      $error_field = implode('][', $element['#parents']).']['.$field_key;
563 563
       form_set_error($error_field, t('Only numbers and the decimal character (%decimal) are allowed in %field.', array('%decimal' => $element['#decimal'], '%field' => t($field['widget']['label']))));
564 564
     }
565 565
     else {
Please login to merge, or discard this patch.
boinc/modules/contrib/cck/modules/optionwidgets/optionwidgets.module 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
     $field_type = $form['#field']['type'];
17 17
     $label = $form['#field']['widget']['label'];
18 18
 
19
-    $output = '<p>'. t('Create a list of options as a list in <strong>Allowed values list</strong> or as an array in PHP code. These values will be the same for %field in all content types.', array('%field' => $label)) .'</p>';
19
+    $output = '<p>'.t('Create a list of options as a list in <strong>Allowed values list</strong> or as an array in PHP code. These values will be the same for %field in all content types.', array('%field' => $label)).'</p>';
20 20
 
21 21
     if ($widget_type == 'optionwidgets_onoff') {
22
-      $output .= '<p>'. t("For a 'single on/off checkbox' widget, define the 'off' value first, then the 'on' value in the <strong>Allowed values</strong> section. Note that the checkbox will be labeled with the label of the 'on' value.") .'</p>';
22
+      $output .= '<p>'.t("For a 'single on/off checkbox' widget, define the 'off' value first, then the 'on' value in the <strong>Allowed values</strong> section. Note that the checkbox will be labeled with the label of the 'on' value.").'</p>';
23 23
     }
24 24
     elseif ($widget_type == 'optionwidgets_buttons') {
25
-      $output .= '<p>'. t("The 'checkboxes/radio buttons' widget will display checkboxes if the multiple values option is selected for this field, otherwise radios will be displayed.") .'</p>';
25
+      $output .= '<p>'.t("The 'checkboxes/radio buttons' widget will display checkboxes if the multiple values option is selected for this field, otherwise radios will be displayed.").'</p>';
26 26
     }
27 27
 
28 28
     if (in_array($field_type, array('text', 'number_integer', 'number_float', 'number_decimal'))
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
       unset($items[0]);
330 330
     }
331 331
     if (count($items) > $field['multiple']) {
332
-      $field_key  = $element['#columns'][0];
332
+      $field_key = $element['#columns'][0];
333 333
       form_error($element[$field_key], t('%name: this field cannot hold more than @count values.', array('%name' => t($field['widget']['label']), '@count' => $field['multiple'])));
334 334
     }
335 335
   }
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
  */
369 369
 function optionwidgets_form2data($element, $field) {
370 370
   $field_key = $element['#columns'][0];
371
-  $items = (array) $element[$field_key]['#value'];
371
+  $items = (array)$element[$field_key]['#value'];
372 372
   $options = optionwidgets_options($field);
373 373
 
374 374
   $values = array_values($items);
@@ -399,8 +399,8 @@  discard block
 block discarded – undo
399 399
  *   when allowed values list is generated using PHP code.
400 400
  */
401 401
 function optionwidgets_options($field, $flatten = TRUE) {
402
-  $function = $field['module'] .'_allowed_values';
403
-  $options = function_exists($function) ? $function($field) : (array) content_allowed_values($field, $flatten);
402
+  $function = $field['module'].'_allowed_values';
403
+  $options = function_exists($function) ? $function($field) : (array)content_allowed_values($field, $flatten);
404 404
   // Add an empty choice for :
405 405
   // - non required radios
406 406
   // - non required selects
Please login to merge, or discard this patch.
default/boinc/modules/contrib/cck/modules/content_copy/content_copy.module 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
  *  A form to export field definitions.
70 70
  */
71 71
 function content_copy_export_form(&$form_state) {
72
-  include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
73
-  include_once('./'. drupal_get_path('module', 'node') .'/content_types.inc');
72
+  include_once('./'.drupal_get_path('module', 'content').'/includes/content.admin.inc');
73
+  include_once('./'.drupal_get_path('module', 'node').'/content_types.inc');
74 74
 
75 75
   $form_values = isset($form_state['values']) ? $form_state['values'] : array();
76 76
   $step = isset($form_state['storage']['step']) ? $form_state['storage']['step'] + 1 : 1;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
   switch ($step) {
100 100
     case 1: // Select a content type.
101
-      $types  = content_copy_types();
101
+      $types = content_copy_types();
102 102
       $form['type_name'] = array(
103 103
         '#title' => t('Types'),
104 104
         '#type' => 'radios',
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
   $output = content_copy_get_macro();
264 264
 
265 265
   // Add weights of non-CCK fields.
266
-  if ($extra = variable_get('content_extra_weights_'. $form_values['type_name'], array())) {
267
-    $output .= "\$content['extra']  = ". var_export((array) $extra, TRUE) .";\n";
266
+  if ($extra = variable_get('content_extra_weights_'.$form_values['type_name'], array())) {
267
+    $output .= "\$content['extra']  = ".var_export((array)$extra, TRUE).";\n";
268 268
   }
269 269
 
270 270
   return $output;
@@ -294,8 +294,8 @@  discard block
 block discarded – undo
294 294
  * }
295 295
  */
296 296
 function content_copy_import_form(&$form_state, $type_name = '') {
297
-  include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
298
-  include_once('./'. drupal_get_path('module', 'node') .'/content_types.inc');
297
+  include_once('./'.drupal_get_path('module', 'content').'/includes/content.admin.inc');
298
+  include_once('./'.drupal_get_path('module', 'node').'/content_types.inc');
299 299
 
300 300
   $form['#prefix'] = t('This form will import field definitions exported from another content type or another database.<br/>Note that fields cannot be duplicated within the same content type, so imported fields will be added only if they do not already exist in the selected type.');
301 301
   $form['type_name'] = array(
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     if (isset($_REQUEST['type_name'])) {
323 323
       $form['type_name']['#default_value'] = $_REQUEST['type_name'];
324 324
     }
325
-    $form['#prefix'] .= '<p class="error">'. t('A file has been pre-loaded for import.') .'</p>';
325
+    $form['#prefix'] .= '<p class="error">'.t('A file has been pre-loaded for import.').'</p>';
326 326
   }
327 327
   return $form;
328 328
 }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
   // If there are groups in the import, make sure the fieldgroup module is enabled.
374 374
   $imported_groups = array();
375 375
   if (isset($content['groups']) && module_exists('fieldgroup')) {
376
-    $imported_groups = (array) $content['groups'];
376
+    $imported_groups = (array)$content['groups'];
377 377
   }
378 378
   elseif (isset($content['groups']) && is_array($content['groups'])) {
379 379
     $not_enabled[] = 'fieldgroup';
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
   // Create the content type, if requested.
420 420
   if ($form_values['type_name'] == '<create>') {
421 421
 
422
-    $type = (object) $imported_type;
422
+    $type = (object)$imported_type;
423 423
     $values = $imported_type;
424 424
     // Prevent a warning in node/content_types.inc
425 425
     $type->has_title = TRUE;
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 
459 459
     // Make sure the field doesn't already exist in the type.
460 460
     // If so, do nothing, fields can't be duplicated within a content type.
461
-    $field_name   = $field['field_name'];
461
+    $field_name = $field['field_name'];
462 462
 
463 463
     // Might need to overwrite the content type name if a new type was created.
464 464
     $field['type_name'] = $type_name;
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 
493 493
   // Import weights of non-CCK fields.
494 494
   if (isset($content['extra'])) {
495
-    variable_set('content_extra_weights_'. $type_name, $content['extra']);
495
+    variable_set('content_extra_weights_'.$type_name, $content['extra']);
496 496
   }
497 497
 }
498 498
 
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
   $types = array();
539 539
   $content_info = _content_type_info();
540 540
   foreach ($content_info['content types'] as $type_name => $val) {
541
-    $types[$type_name] = check_plain($val['name']) .' ('. $type_name .')';
541
+    $types[$type_name] = check_plain($val['name']).' ('.$type_name.')';
542 542
   }
543 543
   return $types;
544 544
 }
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
       // The display settings are being fetched directly from the DB. During import,
582 582
       // we'll re-insert the data directly as well.
583 583
       //
584
-      $query = 'SELECT display_settings FROM {'. content_instance_tablename() .'} WHERE field_name = \'%s\'';
584
+      $query = 'SELECT display_settings FROM {'.content_instance_tablename().'} WHERE field_name = \'%s\'';
585 585
       $row_info = db_fetch_array(db_query($query, $field_name));
586 586
 
587 587
       // If an error occurs, notify the user.
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
   $string = "";
615 615
   if (array_key_exists('submissions', $GLOBALS['content_copy'])) {
616 616
     foreach ($GLOBALS['content_copy']['submissions'] as $form_type => $form) {
617
-      $string .= "\$content['$form_type']  = ". var_export((array) $form, TRUE) .";\n";
617
+      $string .= "\$content['$form_type']  = ".var_export((array)$form, TRUE).";\n";
618 618
     }
619 619
     return $string;
620 620
   }
Please login to merge, or discard this patch.
modules/contrib/cck/modules/content_permissions/content_permissions.module 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 function content_permissions_perm() {
8 8
   $perms = array();
9 9
   foreach (content_fields() as $field) {
10
-    $perms[] = 'edit '. $field['field_name'];
11
-    $perms[] = 'view '. $field['field_name'];
10
+    $perms[] = 'edit '.$field['field_name'];
11
+    $perms[] = 'view '.$field['field_name'];
12 12
   }
13 13
   return $perms;
14 14
 }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
   switch ($op) {
23 23
     case 'view':
24 24
     case 'edit':
25
-      return user_access($op .' '. $field['field_name'], $account);
25
+      return user_access($op.' '.$field['field_name'], $account);
26 26
   }
27 27
   return TRUE;
28 28
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/cck/modules/text/text.module 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $form['allowed_values_fieldset']['advanced_options']['markup_allowed_values_php'] = array(
101 101
           '#type' => 'item',
102 102
           '#title' => t('Code'),
103
-          '#value' => !empty($field['allowed_values_php']) ? '<code>'. check_plain($field['allowed_values_php']) .'</code>' : t('&lt;none&gt;'),
103
+          '#value' => !empty($field['allowed_values_php']) ? '<code>'.check_plain($field['allowed_values_php']).'</code>' : t('&lt;none&gt;'),
104 104
           '#description' => empty($field['allowed_values_php']) ? t("You're not allowed to input PHP code.") : t('This PHP code was set by an administrator and will override the allowed values list above.'),
105 105
         );
106 106
       }
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
         $table_alias = content_views_tablename($field);
130 130
 
131 131
         // Filter: Add a 'many to one' filter.
132
-        $copy = $data[$table_alias][$field['field_name'] .'_value'];
132
+        $copy = $data[$table_alias][$field['field_name'].'_value'];
133 133
         $copy['title'] = t('@label (!name) - Allowed values', array('@label' => t($field['widget']['label']), '!name' => $field['field_name']));
134 134
         $copy['filter']['handler'] = 'content_handler_filter_many_to_one';
135 135
         unset($copy['field'], $copy['argument'], $copy['sort']);
136
-        $data[$table_alias][$field['field_name'] .'_value_many_to_one'] = $copy;
136
+        $data[$table_alias][$field['field_name'].'_value_many_to_one'] = $copy;
137 137
         // Argument : swap the handler to the 'many to one' operator.
138
-        $data[$table_alias][$field['field_name'] .'_value']['argument']['handler'] = 'content_handler_argument_many_to_one';
138
+        $data[$table_alias][$field['field_name'].'_value']['argument']['handler'] = 'content_handler_argument_many_to_one';
139 139
         return $data;
140 140
       }
141 141
   }
@@ -214,14 +214,14 @@  discard block
 block discarded – undo
214 214
  * Theme function for 'default' text field formatter.
215 215
  */
216 216
 function theme_text_formatter_default($element) {
217
-  return ($allowed =_text_allowed_values($element)) ? $allowed : $element['#item']['safe'];
217
+  return ($allowed = _text_allowed_values($element)) ? $allowed : $element['#item']['safe'];
218 218
 }
219 219
 
220 220
 /**
221 221
  * Theme function for 'plain' text field formatter.
222 222
  */
223 223
 function theme_text_formatter_plain($element) {
224
-  return ($allowed =_text_allowed_values($element)) ? $allowed : strip_tags($element['#item']['safe']);
224
+  return ($allowed = _text_allowed_values($element)) ? $allowed : strip_tags($element['#item']['safe']);
225 225
 }
226 226
 
227 227
 /**
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
  */
230 230
 function theme_text_formatter_trimmed($element) {
231 231
   $field = content_fields($element['#field_name'], $element['#type_name']);
232
-  return ($allowed =_text_allowed_values($element)) ? $allowed : node_teaser($element['#item']['safe'], $field['text_processing'] ? $element['#item']['format'] : NULL);
232
+  return ($allowed = _text_allowed_values($element)) ? $allowed : node_teaser($element['#item']['safe'], $field['text_processing'] ? $element['#item']['format'] : NULL);
233 233
 }
234 234
 
235 235
 function _text_allowed_values($element) {
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
   if (!empty($field['text_processing'])) {
410 410
     $filter_key = $element['#columns'][1];
411 411
     $format = isset($element['#value'][$filter_key]) ? $element['#value'][$filter_key] : FILTER_FORMAT_DEFAULT;
412
-    $parents = array_merge($element['#parents'] , array($filter_key));
412
+    $parents = array_merge($element['#parents'], array($filter_key));
413 413
     $element[$filter_key] = filter_form($format, 1, $parents);
414 414
   }
415 415
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
  */
433 433
 function text_textarea_process($element, $edit, $form_state, $form) {
434 434
   $field = $form['#field_info'][$element['#field_name']];
435
-  $field_key   = $element['#columns'][0];
435
+  $field_key = $element['#columns'][0];
436 436
   $element[$field_key] = array(
437 437
     '#type' => 'textarea',
438 438
     '#default_value' => isset($element['#value'][$field_key]) ? $element['#value'][$field_key] : NULL,
@@ -450,9 +450,9 @@  discard block
 block discarded – undo
450 450
   );
451 451
 
452 452
   if (!empty($field['text_processing'])) {
453
-    $filter_key  = (count($element['#columns']) == 2) ? $element['#columns'][1] : 'format';
453
+    $filter_key = (count($element['#columns']) == 2) ? $element['#columns'][1] : 'format';
454 454
     $format = isset($element['#value'][$filter_key]) ? $element['#value'][$filter_key] : FILTER_FORMAT_DEFAULT;
455
-    $parents = array_merge($element['#parents'] , array($filter_key));
455
+    $parents = array_merge($element['#parents'], array($filter_key));
456 456
     $element[$filter_key] = filter_form($format, 1, $parents);
457 457
   }
458 458
 
Please login to merge, or discard this patch.
boinc/modules/contrib/cck/modules/userreference/userreference.module 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
  */
49 49
 function userreference_ctools_plugin_directory($module, $plugin) {
50 50
   if ($module == 'ctools' && $plugin == 'relationships') {
51
-    return 'panels/' . $plugin;
51
+    return 'panels/'.$plugin;
52 52
   }
53 53
 }
54 54
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             '#title' => t('View used to select the users'),
112 112
             '#options' => $views,
113 113
             '#default_value' => isset($field['advanced_view']) ? $field['advanced_view'] : '--',
114
-            '#description' =>  t('<p>Choose the "Views module" view that selects the users that can be referenced.<br />Note:</p>') .
114
+            '#description' =>  t('<p>Choose the "Views module" view that selects the users that can be referenced.<br />Note:</p>').
115 115
               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>'),
116 116
           );
117 117
           $form['advanced']['advanced_view_args'] = array(
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         }
125 125
         else {
126 126
           $form['advanced']['no_view_help'] = array(
127
-            '#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>') .
127
+            '#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 128
               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>'),
129 129
           );
130 130
         }
@@ -151,20 +151,20 @@  discard block
 block discarded – undo
151 151
       $table_alias = content_views_tablename($field);
152 152
 
153 153
       // Filter : swap the handler to the 'in' operator.
154
-      $data[$table_alias][$field['field_name'] .'_uid']['filter']['handler'] = 'content_handler_filter_many_to_one';
154
+      $data[$table_alias][$field['field_name'].'_uid']['filter']['handler'] = 'content_handler_filter_many_to_one';
155 155
       // Argument: get the user name for summaries.
156 156
       // We need to join a new instance of the users table.
157 157
       $data["users_$table_alias"]['table']['join']['node'] = array(
158 158
         'table' => 'users',
159 159
         'field' => 'uid',
160 160
         'left_table' => $table_alias,
161
-        'left_field' => $field['field_name'] .'_uid',
161
+        'left_field' => $field['field_name'].'_uid',
162 162
       );
163
-      $data[$table_alias][$field['field_name'] .'_uid']['argument']['handler'] = 'content_handler_argument_reference';
164
-      $data[$table_alias][$field['field_name'] .'_uid']['argument']['name table'] = "users_$table_alias";
165
-      $data[$table_alias][$field['field_name'] .'_uid']['argument']['name field'] = 'name';
163
+      $data[$table_alias][$field['field_name'].'_uid']['argument']['handler'] = 'content_handler_argument_reference';
164
+      $data[$table_alias][$field['field_name'].'_uid']['argument']['name table'] = "users_$table_alias";
165
+      $data[$table_alias][$field['field_name'].'_uid']['argument']['name field'] = 'name';
166 166
       // Relationship: Add a relationship for related user.
167
-      $data[$table_alias][$field['field_name'] .'_uid']['relationship'] = array(
167
+      $data[$table_alias][$field['field_name'].'_uid']['relationship'] = array(
168 168
         'base' => 'users',
169 169
         'field' => $db_info['columns']['uid']['column'],
170 170
         'handler' => 'content_handler_relationship',
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
  * Substitute in the user name for the uid.
450 450
  */
451 451
 function userreference_autocomplete_value($element, $edit = FALSE) {
452
-  $field_key  = $element['#columns'][0];
452
+  $field_key = $element['#columns'][0];
453 453
   if (!empty($element['#default_value'][$field_key])) {
454 454
     $value = db_result(db_query("SELECT name FROM {users} WHERE uid = '%d'", $element['#default_value'][$field_key]));
455 455
     return array($field_key => $value);
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
   // The userreference_select widget doesn't need to create its own
470 470
   // element, it can wrap around the optionwidgets_select element.
471 471
   // Add a validation step where the value can be unwrapped.
472
-  $field_key  = $element['#columns'][0];
472
+  $field_key = $element['#columns'][0];
473 473
   $element[$field_key] = array(
474 474
     '#type' => 'optionwidgets_select',
475 475
     '#default_value' => isset($element['#value']) ? $element['#value'] : '',
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
   // The userreference_select widget doesn't need to create its own
503 503
   // element, it can wrap around the optionwidgets_select element.
504 504
   // Add a validation step where the value can be unwrapped.
505
-  $field_key  = $element['#columns'][0];
505
+  $field_key = $element['#columns'][0];
506 506
   $element[$field_key] = array(
507 507
     '#type' => 'optionwidgets_buttons',
508 508
     '#default_value' => isset($element['#value']) ? $element['#value'] : '',
@@ -535,12 +535,12 @@  discard block
 block discarded – undo
535 535
   // element, it can wrap around the text_textfield element and add an autocomplete
536 536
   // path and some extra processing to it.
537 537
   // Add a validation step where the value can be unwrapped.
538
-  $field_key  = $element['#columns'][0];
538
+  $field_key = $element['#columns'][0];
539 539
 
540 540
   $element[$field_key] = array(
541 541
     '#type' => 'text_textfield',
542 542
     '#default_value' => isset($element['#value']) ? $element['#value'] : '',
543
-    '#autocomplete_path' => 'userreference/autocomplete/'. $element['#field_name'],
543
+    '#autocomplete_path' => 'userreference/autocomplete/'.$element['#field_name'],
544 544
     // The following values were set by the content module and need
545 545
     // to be passed down to the nested element.
546 546
     '#title' => $element['#title'],
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
  * like optionwidgets are using #element_validate to alter the value.
579 579
  */
580 580
 function userreference_optionwidgets_validate($element, &$form_state) {
581
-  $field_key  = $element['#columns'][0];
581
+  $field_key = $element['#columns'][0];
582 582
 
583 583
   $value = $form_state['values'];
584 584
   $new_parents = array();
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
   static $results = array();
671 671
 
672 672
   // Create unique id for static cache.
673
-  $cid = $field['field_name'] .':'. $match .':'. ($string !== '' ? $string : implode('-', $ids)) .':'. $limit;
673
+  $cid = $field['field_name'].':'.$match.':'.($string !== '' ? $string : implode('-', $ids)).':'.$limit;
674 674
   if (!isset($results[$cid])) {
675 675
     $references = FALSE;
676 676
     if (module_exists('views') && !empty($field['advanced_view']) && $field['advanced_view'] != '--') {
@@ -783,11 +783,11 @@  discard block
 block discarded – undo
783 783
       'equals' => "= '%s'",
784 784
       'starts_with' => "$like '%s%%'",
785 785
     );
786
-    $where[] = 'u.name '. (isset($match_clauses[$match]) ? $match_clauses[$match] : $match_clauses['contains']);
786
+    $where[] = 'u.name '.(isset($match_clauses[$match]) ? $match_clauses[$match] : $match_clauses['contains']);
787 787
     $args[] = $string;
788 788
   }
789 789
   elseif ($ids) {
790
-    $where[] = 'u.uid IN (' . db_placeholders($ids) . ')';
790
+    $where[] = 'u.uid IN ('.db_placeholders($ids).')';
791 791
     $args = array_merge($args, $ids);
792 792
   }
793 793
   else {
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
     $roles = array_intersect(array_keys(user_roles(1)), $roles);
803 803
   }
804 804
   if (!empty($roles) && !in_array(DRUPAL_AUTHENTICATED_RID, $roles)) {
805
-    $where[] = "r.rid IN (". implode($roles, ',') .")";
805
+    $where[] = "r.rid IN (".implode($roles, ',').")";
806 806
     $join[] = 'LEFT JOIN {users_roles} r ON u.uid = r.uid';
807 807
   }
808 808
 
@@ -812,8 +812,8 @@  discard block
 block discarded – undo
812 812
   }
813 813
 
814 814
   $users = array();
815
-  $where_clause = $where ? 'WHERE ('. implode(') AND (', $where) .')' : '';
816
-  $result = db_query('SELECT u.name, u.uid FROM {users} u '. implode(' ', $join) ." $where_clause ORDER BY u.name ASC", $args);
815
+  $where_clause = $where ? 'WHERE ('.implode(') AND (', $where).')' : '';
816
+  $result = db_query('SELECT u.name, u.uid FROM {users} u '.implode(' ', $join)." $where_clause ORDER BY u.name ASC", $args);
817 817
   while ($user = db_fetch_object($result)) {
818 818
     $users[$user->uid] = array(
819 819
       'title' => $user->name,
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
   $references = _userreference_potential_references($field, $string, $match, array(), 10);
836 836
   foreach ($references as $id => $row) {
837 837
     // Add a class wrapper for a few required CSS overrides.
838
-    $matches[$row['title']] = '<div class="reference-autocomplete">'. $row['rendered'] . '</div>';
838
+    $matches[$row['title']] = '<div class="reference-autocomplete">'.$row['rendered'].'</div>';
839 839
   }
840 840
   drupal_json($matches);
841 841
 }
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
       }
871 871
       foreach ($search_tables as $table => $columns) {
872 872
         foreach ($columns as $column) {
873
-          $ids = db_query(db_rewrite_sql("SELECT DISTINCT(n.nid), n.title, n.type FROM {node} n LEFT JOIN {". $table ."} f ON n.vid = f.vid WHERE f.". $column ."=". $account->uid. " AND n.status = 1"));
873
+          $ids = db_query(db_rewrite_sql("SELECT DISTINCT(n.nid), n.title, n.type FROM {node} n LEFT JOIN {".$table."} f ON n.vid = f.vid WHERE f.".$column."=".$account->uid." AND n.status = 1"));
874 874
           while ($data = db_fetch_object($ids)) {
875 875
             $additions[$data->type][$data->nid] = $data->title;
876 876
           }
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
         $values = array();
887 887
         foreach ($account->userreference as $node_type => $nodes) {
888 888
           foreach ($nodes as $nid => $title) {
889
-            $values[$node_type][] = l($title, 'node/'. $nid);
889
+            $values[$node_type][] = l($title, 'node/'.$nid);
890 890
           }
891 891
           if (isset($values[$node_type])) {
892 892
             $additions[] = array(
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/cck/theme/theme.inc 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
 function template_preprocess_content_field_overview_form(&$vars) {
9 9
   $form = &$vars['form'];
10 10
 
11
-  $vars['help'] = theme('advanced_help_topic', 'content', 'manage-fields') . t('Add fields and groups to the content type, and arrange them on content display and input forms.');
11
+  $vars['help'] = theme('advanced_help_topic', 'content', 'manage-fields').t('Add fields and groups to the content type, and arrange them on content display and input forms.');
12 12
   if (module_exists('fieldgroup')) {
13
-    $vars['help'] .= '<br/>'. t('You can add a field to a group by dragging it below and to the right of the group.');
13
+    $vars['help'] .= '<br/>'.t('You can add a field to a group by dragging it below and to the right of the group.');
14 14
   }
15 15
   if (!module_exists('advanced_help')) {
16
-    $vars['help'] .= '<br/>' . t('Note: Installing the <a href="!adv_help">Advanced help</a> module will let you access more and better help.', array('!adv_help' => 'http://drupal.org/project/advanced_help'));
16
+    $vars['help'] .= '<br/>'.t('Note: Installing the <a href="!adv_help">Advanced help</a> module will let you access more and better help.', array('!adv_help' => 'http://drupal.org/project/advanced_help'));
17 17
   }
18 18
 
19 19
   $order = _content_overview_order($form, $form['#field_rows'], $form['#group_rows']);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     foreach (element_children($element) as $child) {
67 67
       $row->{$child} = drupal_render($element[$child]);
68 68
     }
69
-    $row->label_class = 'label-'. strtr($element['#row_type'], '_', '-');
69
+    $row->label_class = 'label-'.strtr($element['#row_type'], '_', '-');
70 70
     $row->row_type = $element['#row_type'];
71 71
     $row->indentation = theme('indentation', isset($element['#depth']) ? $element['#depth'] : 0);
72 72
     $row->class = 'draggable';
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     $js_fields[$field_name] = array('label' => $field['widget']['label'], 'type' => $field['type'], 'widget' => $field['widget']['type']);
95 95
   }
96 96
   drupal_add_js(array('contentWidgetTypes' => content_widget_type_options(), 'contentFields' => $js_fields), 'setting');
97
-  drupal_add_js(drupal_get_path('module', 'content') .'/content.js');
97
+  drupal_add_js(drupal_get_path('module', 'content').'/content.js');
98 98
 }
99 99
 
100 100
 /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
   else {
114 114
     $help = t("Configure how this content type's fields should be displayed when it's rendered in the following contexts.");
115 115
   }
116
-  $help .= ' '. t("Use the 'Exclude' checkbox to exclude an item from the !content value passed to the node template.", array('!content' => '$content'));
116
+  $help .= ' '.t("Use the 'Exclude' checkbox to exclude an item from the !content value passed to the node template.", array('!content' => '$content'));
117 117
   $vars['help'] = $help;
118 118
 
119 119
   $order = _content_overview_order($form, $form['#fields'], $form['#groups']);
Please login to merge, or discard this patch.