Completed
Push — 7.x-3.x ( daa35d...1b5187 )
by Devin
03:09
created
modules/commons/commons_q_a/commons_q_a.commons.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
  */
45 45
 function commons_q_a_commons_bw_create_all_widget($group) {
46 46
   if (og_user_access('node', $group->nid, 'create question content')) {
47
-    $link = l(t('Ask a question'),'node/add/question',
47
+    $link = l(t('Ask a question'), 'node/add/question',
48 48
       array('attributes' => array('class' => 'commons-q-a-create'), 'query' => array('og_group_ref' => $group->nid))
49 49
     );
50 50
     return array(
Please login to merge, or discard this patch.
modules/commons/commons_q_a/commons_q_a.module 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -130,8 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
     if (user_is_anonymous()) {
132 132
       $account = drupal_anonymous_user();
133
-    }
134
-    else {
133
+    } else {
135 134
       $account = $user;
136 135
     }
137 136
 
@@ -302,12 +301,10 @@  discard block
 block discarded – undo
302 301
   if ($results['rating'] > 0) {
303 302
     $score = $results['rating'];
304 303
     $score_class = 'positive';
305
-  }
306
-  elseif ($results['rating'] < 0) {
304
+  } elseif ($results['rating'] < 0) {
307 305
     $score = $results['rating'];
308 306
     $score_class = 'negative';
309
-  }
310
-  else {
307
+  } else {
311 308
     $score = 0;
312 309
     $score_class = 'neutral';
313 310
   }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             'attributes' => array(
38 38
               'title' => t('Answer this question'),
39 39
             ),
40
-            'href' => 'node/' . $node->nid,
40
+            'href' => 'node/'.$node->nid,
41 41
             'fragment' => 'answer',
42 42
           ),
43 43
         ),
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
       }
158 158
       $answer_form = drupal_get_form('answer_node_form', $node);
159 159
       $answer_form['header'] = array(
160
-        '#markup' => '<h3 id="answer" name="answer">' . t('Add a new answer') . '</h3>',
160
+        '#markup' => '<h3 id="answer" name="answer">'.t('Add a new answer').'</h3>',
161 161
         '#weight' => -10,
162 162
       );
163 163
       // Hide any vertical tabs that might be present.
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 function commons_q_a_form_node_form_alter(&$form, &$form_state, $form_id) {
203 203
   $node = $form['#node'];
204 204
 
205
-  list(, , $bundle) = entity_extract_ids('node', $node);
205
+  list(,, $bundle) = entity_extract_ids('node', $node);
206 206
 
207 207
   if ($bundle == 'question' && empty($node->nid)) {
208 208
     drupal_set_title(t('Ask a question'));
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     $form['container']['comment_body'] = $form['comment_body'];
237 237
     $form['container']['actions'] = $form['actions'];
238 238
     unset($form['author']);
239
-    unset($form['subject']);  // We don't need a subject, they're pointless within comments.
239
+    unset($form['subject']); // We don't need a subject, they're pointless within comments.
240 240
     unset($form['comment_body']);
241 241
     unset($form['actions']);
242 242
   }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
  */
259 259
 function commons_q_a_answer_submit($form, &$form_state) {
260 260
   // Redirect the user back to the related question.
261
-  $form_state['redirect'] = 'node/' . $form_state['values']['field_related_question'][LANGUAGE_NONE][0]['target_id'];
261
+  $form_state['redirect'] = 'node/'.$form_state['values']['field_related_question'][LANGUAGE_NONE][0]['target_id'];
262 262
 }
263 263
 
264 264
 /**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     array(-1, 'down'),
340 340
   );
341 341
   $templates['commons_thumbs_up_down']->theme = 'rate_template_commons_thumbs_up_down';
342
-  $templates['commons_thumbs_up_down']->css = drupal_get_path('module', 'commons_q_a') . '/commons-thumbs-up-down.css';
342
+  $templates['commons_thumbs_up_down']->css = drupal_get_path('module', 'commons_q_a').'/commons-thumbs-up-down.css';
343 343
   $templates['commons_thumbs_up_down']->customizable = FALSE;
344 344
   $templates['commons_thumbs_up_down']->translate = TRUE;
345 345
   $templates['commons_thumbs_up_down']->use_source_translation = TRUE;
Please login to merge, or discard this patch.
commons.install_callbacks.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
   // Create a user for each username.
33 33
   foreach ($demo_usernames as $username) {
34
-    list($first_name, $last_name)  = explode(" ", $username);
34
+    list($first_name, $last_name) = explode(" ", $username);
35 35
     $normalized_username = commons_normalize_name($username);
36 36
     $password = user_password(8);
37 37
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
   $event->field_address[LANGUAGE_NONE][0]['postal_code'] = '01803';
208 208
   $event->field_address[LANGUAGE_NONE][0]['country'] = 'US';
209 209
   $event->field_address[LANGUAGE_NONE][0]['location'] = 'Waterfront';
210
-  $event->field_address[LANGUAGE_NONE][0]['administrative_area']  = 'MA';
210
+  $event->field_address[LANGUAGE_NONE][0]['administrative_area'] = 'MA';
211 211
   $event->field_address[LANGUAGE_NONE][0]['locality'] = 'Boston';
212 212
   $event->og_group_ref[LANGUAGE_NONE][0]['target_id'] = $demo_groups['boston']->nid;
213 213
   node_save($event);
Please login to merge, or discard this patch.
modules/commons/commons_groups/commons_groups.features.field_instance.inc 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
       'weight' => 1,
215 215
     ),
216 216
   );
217
-   // Exported field_instance: 'node-group-body'
217
+    // Exported field_instance: 'node-group-body'
218 218
   $field_instances["$entity_type-$bundle-body"] = array(
219 219
     'bundle' => $bundle,
220 220
     'default_value' => NULL,
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
   $commons_groups_entity_types = commons_groups_get_group_content_entity_types();
14 14
   if (!empty($commons_groups_entity_types)) {
15 15
     foreach ($commons_groups_entity_types as $entity_type => $bundles) {
16
-      foreach(array_keys($bundles) as $bundle) {
16
+      foreach (array_keys($bundles) as $bundle) {
17 17
         commons_groups_field_definition($field_instances, $entity_type, $bundle);
18 18
       }
19 19
     }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     // to create the group audience field for it when installing the profile.
26 26
     $group_bundles['node'] = array('group' => TRUE);
27 27
   }
28
-  foreach(array_keys($group_bundles['node']) as $bundle) {
28
+  foreach (array_keys($group_bundles['node']) as $bundle) {
29 29
     commons_groups_field_definition_group($field_instances, 'node', $bundle);
30 30
   }
31 31
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
   );
258 258
 
259 259
   // Exported field_instance: 'node-group-group_group'
260
-  $field_instances["$entity_type-$bundle-" . OG_GROUP_FIELD] = array(
260
+  $field_instances["$entity_type-$bundle-".OG_GROUP_FIELD] = array(
261 261
     'bundle' => $bundle,
262 262
     'default_value' => array(
263 263
       0 => array(
Please login to merge, or discard this patch.
modules/commons/commons_topics/commons_topics.module 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     $commons_topics_entity_types = commons_topics_get_entity_types_with_topics();
20 20
     if (!empty($commons_topics_entity_types)) {
21 21
       foreach ($commons_topics_entity_types as $entity_type => $bundles) {
22
-        foreach(array_keys($bundles) as $bundle) {
22
+        foreach (array_keys($bundles) as $bundle) {
23 23
           $info['features']['field_instance'][] = "$entity_type-$bundle-field_topics";
24 24
         }
25 25
       }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     );
43 43
     $form['topics_wrapper']['field_topics'] = $form['field_topics'];
44 44
     $form['field_topics'] = array('#language' => NULL);
45
-    $form['#attached']['js'][] = drupal_get_path('module', 'commons_topics') . '/js/commons_topics.js';
45
+    $form['#attached']['js'][] = drupal_get_path('module', 'commons_topics').'/js/commons_topics.js';
46 46
   }
47 47
 }
48 48
 
Please login to merge, or discard this patch.
modules/commons/commons_groups/commons_groups.features.field_base.inc 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
   );
146 146
 
147 147
 // Exported field_base: 'og_group_ref'
148
- $field_bases['og_group_ref'] = array(
148
+  $field_bases['og_group_ref'] = array(
149 149
     'active' => '1',
150 150
     'cardinality' => '-1',
151 151
     'deleted' => '0',
Please login to merge, or discard this patch.
modules/commons/commons_polls/commons_polls.module 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 /**
10 10
 * Implements hook_strongarm_alter().
11 11
 */
12
- function commons_polls_strongarm_alter(&$items) {
12
+  function commons_polls_strongarm_alter(&$items) {
13 13
   // Expose the poll content type for integration with Commons Radioactivity
14 14
   // and Commons Groups.
15 15
   foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 function commons_polls_form_node_form_alter(&$form, &$form_state, $form_id) {
26 26
   $node = $form['#node'];
27 27
 
28
-  list(, , $bundle) = entity_extract_ids('node', $node);
28
+  list(,, $bundle) = entity_extract_ids('node', $node);
29 29
 
30 30
   if ($bundle == 'poll' && empty($node->nid)) {
31 31
     drupal_set_title(t('Create a poll'));
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
   }
81 81
 
82 82
   $form['choice_wrapper']['add_choice'] = array(
83
-    '#markup' => '<a href="#" id="add-choice">' . t('Add more choices') . '</a>',
83
+    '#markup' => '<a href="#" id="add-choice">'.t('Add more choices').'</a>',
84 84
   );
85 85
 
86
-  $form['#attached']['js'][] = drupal_get_path('module', 'commons_polls') . '/js/commons_polls_partial_form.js';
86
+  $form['#attached']['js'][] = drupal_get_path('module', 'commons_polls').'/js/commons_polls_partial_form.js';
87 87
 
88 88
   $form['actions']['submit']['#value'] = t('Create');
89 89
 
Please login to merge, or discard this patch.
modules/commons/commons_radioactivity/commons_radioactivity.module 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     if (!empty($commons_radioactivity_entity_types)) {
34 34
       foreach ($commons_radioactivity_entity_types as $entity_type => $bundles) {
35
-        foreach(array_keys($bundles) as $bundle) {
35
+        foreach (array_keys($bundles) as $bundle) {
36 36
           $info['features']['field_instance'][] = "$entity_type-$bundle-field_radioactivity";
37 37
         }
38 38
       }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     $form['field_radioactivity']['#attributes'] = array(
56 56
       'class' => array('radioactivity-form-energy'),
57 57
     );
58
-    $form['field_radioactivity']['#attached']['js'][] = drupal_get_path('module', 'commons_radioactivity') . '/commons_radioactivity.js';
58
+    $form['field_radioactivity']['#attached']['js'][] = drupal_get_path('module', 'commons_radioactivity').'/commons_radioactivity.js';
59 59
   }
60 60
 }
61 61
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
   // Only operate on nodes that have the radioactivity field.
99 99
   if (!empty($node->field_radioactivity)) {
100 100
     // Find the node's ID and bundle.
101
-    list($id, , $bundle) = entity_extract_ids('node', $node);
101
+    list($id,, $bundle) = entity_extract_ids('node', $node);
102 102
 
103 103
     // Prevent groups from going negative in energy.
104 104
     if ($bundle == 'group' && $node->field_radioactivity[LANGUAGE_NONE][0]['radioactivity_energy'] + $value >= 0) {
Please login to merge, or discard this patch.
modules/commons/commons_utility_links/commons_utility_links.api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
   if (user_is_logged_in()) {
37 37
     global $user;
38 38
     $account = $user;
39
-    $links['find_fiends']= array(
40
-      'href' => 'user/' . $account->uid . '/find_friends',
39
+    $links['find_fiends'] = array(
40
+      'href' => 'user/'.$account->uid.'/find_friends',
41 41
       'title' => t('Find friends'),
42 42
     );
43 43
   }
Please login to merge, or discard this patch.