Completed
Push — 7.x-3.x ( ddcb52...871cb7 )
by Devin
08:17
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.
commons/commons_follow/commons_follow_node/commons_follow_node.module 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     ->condition('fid', $flag_ids, 'IN')
27 27
     ->condition('uid', $account->uid, '=')
28 28
     ->condition('content_type', 'user', '=')
29
-    ->fields('f',array('content_id'))
29
+    ->fields('f', array('content_id'))
30 30
     ->execute()
31 31
     ->fetchAll();
32 32
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
   }
37 37
 
38 38
   $uids = array();
39
-  foreach($result as $row) {
39
+  foreach ($result as $row) {
40 40
     $uids[] = (integer) $row->content_id;
41 41
   }
42 42
 
Please login to merge, or discard this patch.
commons_follow/includes/views/handlers/commons_follow_handler_field_ops.inc 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
   foreach (commons_media_filter_parse_from_fields($entity_type, $entity) as $file_reference) {
80 80
     if (empty($entity_files[$file_reference['fid']])) {
81 81
       $entity_files[$file_reference['fid']] = 1;
82
-    }
83
-    else {
82
+    } else {
84 83
       $entity_files[$file_reference['fid']]++;
85 84
     }
86 85
   }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
   function render($values) {
16 16
     global $user;
17 17
     //If the passed in user doesn't match the current user
18
-    if(isset($this->view->args[0]) && $user->uid != $this->view->args[0]) {
18
+    if (isset($this->view->args[0]) && $user->uid != $this->view->args[0]) {
19 19
 
20 20
       if (!($flag = $this->get_flag())) {
21 21
         // get_flag() itself will print a more detailed message.
@@ -39,17 +39,17 @@  discard block
 block discarded – undo
39 39
 
40 40
       $flag_wrapper_classes_array = array();
41 41
       $flag_wrapper_classes_array[] = 'flag-wrapper';
42
-      $flag_wrapper_classes_array[] = 'flag-' . $variables['flag_css_name'];
43
-      $flag_wrapper_classes_array[] = 'flag-' . $variables['flag_css_name'] . '-' . $content_id;
44
-      $variables['flag_wrapper_classes'] = implode(' ',$flag_wrapper_classes_array);
42
+      $flag_wrapper_classes_array[] = 'flag-'.$variables['flag_css_name'];
43
+      $flag_wrapper_classes_array[] = 'flag-'.$variables['flag_css_name'].'-'.$content_id;
44
+      $variables['flag_wrapper_classes'] = implode(' ', $flag_wrapper_classes_array);
45 45
 
46 46
       $flag_classes_array = array();
47 47
       $flag_classes_array[] = 'flag';
48
-      $flag_classes_array[] = $action . '-action';
49
-      $flag_classes_array[] = 'flag-link-' . $flag->link_type;
48
+      $flag_classes_array[] = $action.'-action';
49
+      $flag_classes_array[] = 'flag-link-'.$flag->link_type;
50 50
       $variables['flag_classes'] = implode(' ', $flag_classes_array);
51 51
       $variables['is_flagged'] = $action;
52
-      $variables['link_text'] = $flag->get_label($action . '_short', $content_id);
52
+      $variables['link_text'] = $flag->get_label($action.'_short', $content_id);
53 53
 
54 54
       return theme('commons_follow_otheruser_flag', $variables);
55 55
     }
Please login to merge, or discard this patch.
commons/commons_follow/commons_follow_group/commons_follow_group.module 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     ->condition('fid', $flag_ids, 'IN')
27 27
     ->condition('uid', $account->uid, '=')
28 28
     ->condition('content_type', 'user', '=')
29
-    ->fields('f',array('content_id'))
29
+    ->fields('f', array('content_id'))
30 30
     ->execute()
31 31
     ->fetchAll();
32 32
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
   }
37 37
 
38 38
   $uids = array();
39
-  foreach($result as $row) {
39
+  foreach ($result as $row) {
40 40
     $uids[] = (integer) $row->content_id;
41 41
   }
42 42
 
Please login to merge, or discard this patch.
modules/commons/commons_wikis/commons_wikis.module 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 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'));
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 /**
135 135
  * Implements hook_strongarm_alter().
136 136
  */
137
- function commons_wikis_strongarm_alter(&$items) {
137
+  function commons_wikis_strongarm_alter(&$items) {
138 138
   // Expose the wiki content type for integration with Commons Radioactivity
139 139
   // and Commons Groups.
140 140
   foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) {
Please login to merge, or discard this patch.
modules/commons/commons_posts/commons_posts.module 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 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'));
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 /**
74 74
  * Implements hook_strongarm_alter().
75 75
  */
76
- function commons_posts_strongarm_alter(&$items) {
76
+  function commons_posts_strongarm_alter(&$items) {
77 77
   // Expose the post content type for integration with Commons Radioactivity
78 78
   // and Commons Groups.
79 79
   foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) {
Please login to merge, or discard this patch.
commons_utility_links/commons_utility_links.commons_utility_links.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -263,8 +263,7 @@
 block discarded – undo
263 263
 
264 264
   if (node_access('create', 'event')) {
265 265
     return t('There are no events. Be the first to <a href="!url">create one</a>!', array('!url' => url('node/add/event')));
266
-  }
267
-  else {
266
+  } else {
268 267
     return t('There are no events. Be the first to create one!');
269 268
   }
270 269
 }
Please login to merge, or discard this patch.