Completed
Push — 7.x-3.x ( e3179b...b35ad2 )
by Devin
03:37
created
modules/commons/commons_media/commons_media.private_files.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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
           // Only move files that aren't currently in use.
58 58
           if (empty($usage)) {
59 59
             $scheme = 'private://';
60
-            $uri = file_stream_wrapper_uri_normalize($scheme . $source_file->filename);
60
+            $uri = file_stream_wrapper_uri_normalize($scheme.$source_file->filename);
61 61
             file_move($source_file, $uri, FILE_EXISTS_RENAME);
62 62
           }
63 63
         }
Please login to merge, or discard this patch.
modules/commons/commons_trusted_contacts/commons_trusted_contacts.module 3 patches
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -360,8 +360,7 @@  discard block
 block discarded – undo
360 360
         // If user is blocked, they should not be able to apply for
361 361
         // membership.
362 362
         return;
363
-      }
364
-      elseif (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) {
363
+      } elseif (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) {
365 364
         // If user is pending, they should not be able to apply for
366 365
         // membership.
367 366
         $link = array(
@@ -373,8 +372,7 @@  discard block
 block discarded – undo
373 372
           ),
374 373
         );
375 374
         $element[0][] = $link;
376
-      }
377
-      elseif (!og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE))) {
375
+      } elseif (!og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE))) {
378 376
         // Check if user can subscribe to the field.
379 377
         if (empty($settings['field_name']) && $audience_field_name = og_get_best_group_audience_field('user', $account, $entity_type, $bundle)) {
380 378
           $settings['field_name'] = $audience_field_name;
@@ -423,8 +421,7 @@  discard block
 block discarded – undo
423 421
               array('system', 'jquery.form'),
424 422
             ),
425 423
           );
426
-        }
427
-        else {
424
+        } else {
428 425
           $link = array('#type' => 'link');
429 426
           $link['#href'] = 'user/login';
430 427
           $link['#options'] = array('query' => array('destination' => $url));
@@ -680,8 +677,7 @@  discard block
 block discarded – undo
680 677
     $commands[] = ajax_command_replace('#user-' . $account->uid, trim(theme('html_tag__request_pending', $element)));
681 678
     $page = array('#type' => 'ajax', '#commands' => $commands);
682 679
     ajax_deliver($page);
683
-  }
684
-  else {
680
+  } else {
685 681
     drupal_goto('user/' . $og_membership->gid);
686 682
   }
687 683
 }
@@ -710,8 +706,7 @@  discard block
 block discarded – undo
710 706
     $commands[] = ajax_command_replace(".field-name-group-group a", $new);
711 707
     $page = array('#type' => 'ajax', '#commands' => $commands);
712 708
     ajax_deliver($page);
713
-  }
714
-  else {
709
+  } else {
715 710
     drupal_goto('user/' . $account->uid);
716 711
   }
717 712
 }
@@ -843,8 +838,7 @@  discard block
 block discarded – undo
843 838
         $commands[] = ajax_command_append('#messages', theme('status_messages'));
844 839
         $page = array('#type' => 'ajax', '#commands' => $commands);
845 840
         ajax_deliver($page);
846
-      }
847
-      else {
841
+      } else {
848 842
         drupal_goto();
849 843
       }
850 844
       return FALSE;
@@ -1289,8 +1283,7 @@  discard block
 block discarded – undo
1289 1283
 function commons_trusted_contacts_batch_finished($success, $results, $operations) {
1290 1284
   if ($success) {
1291 1285
     $message = format_plural($results['processed'], t('One user processed.'), t('@count users processed.'));
1292
-  }
1293
-  else {
1286
+  } else {
1294 1287
     $message = t('Error encountered while upgrading users.');
1295 1288
   }
1296 1289
 
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     'page callback' => 'commons_trusted_contacts_request_trust',
80 80
     'page arguments' => array(1, 3),
81 81
     'access callback' => 'commons_trusted_contacts_request_trust_access',
82
-    'access arguments' => array(1,2),
82
+    'access arguments' => array(1, 2),
83 83
     'type' => MENU_CALLBACK,
84 84
   );
85 85
 
@@ -262,20 +262,20 @@  discard block
 block discarded – undo
262 262
   $view->get_total_rows = TRUE;
263 263
   $view->execute();
264 264
   $tabs['contacts'] = array(
265
-    'title' => t('Trusted Contacts') . ' <span class="commons-bw-result-count">' . $view->total_rows . '</span>',
265
+    'title' => t('Trusted Contacts').' <span class="commons-bw-result-count">'.$view->total_rows.'</span>',
266 266
     'contents' => views_embed_view('trusted_contacts'),
267 267
   );
268 268
 
269 269
   module_load_include('inc', 'privatemsg', 'privatemsg.pages');
270 270
 
271 271
   $tabs['messages'] = array(
272
-    'title' => t('Messages') . ' <span class="commons-bw-result-count">' . privatemsg_unread_count($account) . '</span>',
272
+    'title' => t('Messages').' <span class="commons-bw-result-count">'.privatemsg_unread_count($account).'</span>',
273 273
     'contents' => privatemsg_list_page(),
274 274
   );
275 275
 
276 276
 
277 277
   $tabs['invitations'] = array(
278
-    'title' => t('Invitations') . ' <span class="commons-bw-result-count">' . count(commons_trusted_contacts_get_pending_invitations($account->uid)) . '</span>',
278
+    'title' => t('Invitations').' <span class="commons-bw-result-count">'.count(commons_trusted_contacts_get_pending_invitations($account->uid)).'</span>',
279 279
     'contents' => views_embed_view('trusted_contacts_invitations'),
280 280
   );
281 281
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
       }
337 337
 
338 338
       // Hide the trust link from anonymous and users without subscribe access.
339
-      list($id, , $bundle) = entity_extract_ids($entity_type, $entity);
339
+      list($id,, $bundle) = entity_extract_ids($entity_type, $entity);
340 340
       $user_is_active_member = og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE));
341 341
       if (!$account->uid || !og_user_access('user', $entity->uid, 'subscribe') && !$user_is_active_member) {
342 342
         return;
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
       if (variable_get('commons_trusted_contacts_global_messaging', FALSE) || $user_is_active_member) {
352 352
         $link = array('#type' => 'link');
353 353
         $link['#title'] = t('Message');
354
-        $link['#href'] = 'user/' . $user->uid . '/contacts/messages/popup/' . $id;
354
+        $link['#href'] = 'user/'.$user->uid.'/contacts/messages/popup/'.$id;
355 355
         // without an #options array template.php doesn't assign classes
356 356
         $link['#options'] = array();
357 357
         $element[0][] = $link;
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
           return $element;
401 401
         }
402 402
 
403
-        $token = drupal_get_token('request' . ':' . $id . ':' . $account->uid);
403
+        $token = drupal_get_token('request'.':'.$id.':'.$account->uid);
404 404
         $url = "request-trust/$id/$token/nojs";
405 405
 
406 406
         $link = array('#type' => 'link');
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
           $link['#options'] = array(
411 411
             'attributes' => array(
412 412
               'class' => array('use-ajax'),
413
-              'id' => 'user-' . $entity->uid
413
+              'id' => 'user-'.$entity->uid
414 414
             )
415 415
           );
416 416
           $element[0][] = $link;
@@ -441,11 +441,11 @@  discard block
 block discarded – undo
441 441
 
442 442
     case 'approve_ignore':
443 443
 
444
-      $approve = l(t('Approve'), 'approve-trust/' . $entity->id . '/' . $items[0]['value']);
445
-      $ignore = l(t('Ignore'), 'ignore-trust/' . $entity->id . '/' . $items[0]['value']);
444
+      $approve = l(t('Approve'), 'approve-trust/'.$entity->id.'/'.$items[0]['value']);
445
+      $ignore = l(t('Ignore'), 'ignore-trust/'.$entity->id.'/'.$items[0]['value']);
446 446
 
447 447
       $element[0] = array(
448
-        '#markup' => $approve . ' ' . $ignore,
448
+        '#markup' => $approve.' '.$ignore,
449 449
       );
450 450
       return $element;
451 451
   }
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 
545 545
   // Membership not found, return but throw an error to watchdog.
546 546
   if (!isset($return['og_membership'])) {
547
-    watchdog('commons_trusted_contacts', "Warning: expected trusted contact link not found between " . $og_membership->gid . " and " . $og_membership->etid, WATCHDOG_WARNING);
547
+    watchdog('commons_trusted_contacts', "Warning: expected trusted contact link not found between ".$og_membership->gid." and ".$og_membership->etid, WATCHDOG_WARNING);
548 548
     return;
549 549
   }
550 550
 
@@ -649,8 +649,8 @@  discard block
 block discarded – undo
649 649
   $token = $wrapper->field_membership_token->value();
650 650
   $options = array('absolute' => TRUE);
651 651
   $arguments = array(
652
-    '@{approve-url}' => url('approve-trust/' . $og_membership->id . '/' . $token, $options),
653
-    '@{ignore-url}' => url('ignore-trust/' . $og_membership->id . '/' . $token, $options),
652
+    '@{approve-url}' => url('approve-trust/'.$og_membership->id.'/'.$token, $options),
653
+    '@{ignore-url}' => url('ignore-trust/'.$og_membership->id.'/'.$token, $options),
654 654
   );
655 655
   $message = message_create('trusted_contact_request_pending', array(
656 656
     'uid' => $account->uid,
@@ -677,12 +677,12 @@  discard block
 block discarded – undo
677 677
       ),
678 678
     );
679 679
     // We trip due to https://api.drupal.org/comment/32698#comment-32698
680
-    $commands[] = ajax_command_replace('#user-' . $account->uid, trim(theme('html_tag__request_pending', $element)));
680
+    $commands[] = ajax_command_replace('#user-'.$account->uid, trim(theme('html_tag__request_pending', $element)));
681 681
     $page = array('#type' => 'ajax', '#commands' => $commands);
682 682
     ajax_deliver($page);
683 683
   }
684 684
   else {
685
-    drupal_goto('user/' . $og_membership->gid);
685
+    drupal_goto('user/'.$og_membership->gid);
686 686
   }
687 687
 }
688 688
 
@@ -703,8 +703,8 @@  discard block
 block discarded – undo
703 703
   // Ajax
704 704
 
705 705
   if ($ajax == 'ajax') {
706
-    $token = drupal_get_token('request' . ':' . $account->uid . ':' . $user->uid);
707
-    $new = l(t('Trusted Contact'), 'request-trust/' . $account->uid . '/' . $token . '/nojs', array('attributes' => array('class' => array('use-ajax'))));
706
+    $token = drupal_get_token('request'.':'.$account->uid.':'.$user->uid);
707
+    $new = l(t('Trusted Contact'), 'request-trust/'.$account->uid.'/'.$token.'/nojs', array('attributes' => array('class' => array('use-ajax'))));
708 708
 
709 709
     $commands = array();
710 710
     $commands[] = ajax_command_replace(".field-name-group-group a", $new);
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
     ajax_deliver($page);
713 713
   }
714 714
   else {
715
-    drupal_goto('user/' . $account->uid);
715
+    drupal_goto('user/'.$account->uid);
716 716
   }
717 717
 }
718 718
 
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
   message_notify_send_message($message);
756 756
 
757 757
   // Redirect to Invitations screen.
758
-  drupal_goto('user/' . $user->uid . '/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations')));
758
+  drupal_goto('user/'.$user->uid.'/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations')));
759 759
 }
760 760
 
761 761
 /**
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
   $wrapper->save();
782 782
 
783 783
   // Redirect to Invitations screen.
784
-  drupal_goto('user/' . $user->uid . '/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations')));
784
+  drupal_goto('user/'.$user->uid.'/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations')));
785 785
 }
786 786
 
787 787
 /**
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
         t('You have exceeded the limit of @limit trusted contacts. Before you can add more contacts, you must <a href="@remove-contacts-links">remove some of your existing contacts.</a>',
816 816
           array(
817 817
             '@limit' => $contacts_limit,
818
-            '@remove-contacts-link' => url('user/' . $requestor->uid . '/contacts',
818
+            '@remove-contacts-link' => url('user/'.$requestor->uid.'/contacts',
819 819
               array(
820 820
                 'query' => array(
821 821
                   'qt-commons_trusted_contacts' => 'contacts',
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 function commons_trusted_contacts_request_trust_access($account, $token) {
864 864
   global $user;
865 865
 
866
-  return drupal_valid_token($token, 'request' . ':' . $account->uid . ':' . $user->uid) && user_is_logged_in();
866
+  return drupal_valid_token($token, 'request'.':'.$account->uid.':'.$user->uid) && user_is_logged_in();
867 867
 }
868 868
 
869 869
 /**
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
 function commons_trusted_contacts_un_trust_access($account, $token) {
877 877
   global $user;
878 878
 
879
-  return drupal_valid_token($token, 'untrust' . ':' . $account->uid . ':' . $user->uid) && user_is_logged_in();
879
+  return drupal_valid_token($token, 'untrust'.':'.$account->uid.':'.$user->uid) && user_is_logged_in();
880 880
 }
881 881
 
882 882
 /**
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
   $form['actions']['cancel'] = array(
961 961
     '#type' => 'link',
962 962
     '#title' => t('Cancel'),
963
-    '#href' => 'user/' . $user->uid . '/contacts',
963
+    '#href' => 'user/'.$user->uid.'/contacts',
964 964
     '#options' => array(
965 965
       'query' => array('qt-commons_trusted_contacts' => 'messages'),
966 966
     ),
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
 
979 979
   if ($form['delete_destination']['#value'] == 'messages') {
980 980
     // TODO: Redirect to the messages quick-tab.
981
-    $form['delete_destination']['#value'] = 'user/' . $user->uid . '/contacts';
981
+    $form['delete_destination']['#value'] = 'user/'.$user->uid.'/contacts';
982 982
   }
983 983
 }
984 984
 
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
     // to perform the task of hiding the groups fields.
1029 1029
     '#attached' => array(
1030 1030
       'js' => array(
1031
-        drupal_get_path('module', 'commons_trusted_contacts') . '/scripts/commons-trusted-contacts.js',
1031
+        drupal_get_path('module', 'commons_trusted_contacts').'/scripts/commons-trusted-contacts.js',
1032 1032
       ),
1033 1033
     ),
1034 1034
   );
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
   $actions = array();
1128 1128
   $files = commons_trusted_contacts_operations_load_action_includes();
1129 1129
   foreach ($files as $filename) {
1130
-    $action_info_fn = 'commons_trusted_contacts_' . str_replace('.', '_', basename($filename, '.inc')) . '_info';
1130
+    $action_info_fn = 'commons_trusted_contacts_'.str_replace('.', '_', basename($filename, '.inc')).'_info';
1131 1131
     $action_info = call_user_func($action_info_fn);
1132 1132
     if (is_array($action_info)) {
1133 1133
       $actions += $action_info;
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 function commons_trusted_contacts_operations_load_action_includes() {
1149 1149
   static $loaded = FALSE;
1150 1150
 
1151
-  $path = drupal_get_path('module', 'commons_trusted_contacts') . '/includes/actions/';
1151
+  $path = drupal_get_path('module', 'commons_trusted_contacts').'/includes/actions/';
1152 1152
   $files = array(
1153 1153
     'set_state_active.action.inc',
1154 1154
     'set_state_blocked.action.inc',
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
 
1158 1158
   if (!$loaded) {
1159 1159
     foreach ($files as $file) {
1160
-      include_once $path . $file;
1160
+      include_once $path.$file;
1161 1161
     }
1162 1162
     $loaded = TRUE;
1163 1163
   }
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
   // Include original functions.
1178 1178
   module_load_include('inc', 'privatemsg', 'privatemsg.pages');
1179 1179
 
1180
-  $form = privatemsg_new($form, $form_state, $account->uid, 'New private message from ' . $user->name);
1180
+  $form = privatemsg_new($form, $form_state, $account->uid, 'New private message from '.$user->name);
1181 1181
 
1182 1182
   $form['actions'] = array('#type' => 'actions');
1183 1183
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1141,7 +1141,7 @@
 block discarded – undo
1141 1141
  * Loads the VBO actions placed in their own include files.
1142 1142
  *
1143 1143
  * @return
1144
- *   An array of containing filenames of the included actions.
1144
+ string[]   An array of containing filenames of the included actions.
1145 1145
  *
1146 1146
  * @see views_bulk_operations_load_action_includes()
1147 1147
  */
Please login to merge, or discard this patch.
modules/commons/commons_documents/commons_documents.commons.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
  */
41 41
 function commons_documents_commons_bw_create_all_widget($group) {
42 42
   if (og_user_access('node', $group->nid, 'create document content')) {
43
-    $link = l(t('Create a document'),'node/add/document',
43
+    $link = l(t('Create a document'), 'node/add/document',
44 44
       array('attributes' => array('class' => 'commons-documents-create'), 'query' => array('og_group_ref' => $group->nid))
45 45
     );
46 46
     return array(
Please login to merge, or discard this patch.
commons_events/modules/commons_events_solr/commons_events_solr.module 3 patches
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.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * Get the search adapter and Solr environment for dynamic faceting.
11 11
  */
12 12
 function commons_events_solr_search_environment() {
13
-  return "apachesolr@" . apachesolr_default_environment();
13
+  return "apachesolr@".apachesolr_default_environment();
14 14
 }
15 15
 
16 16
 /**
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
   if (empty($env_id)) {
24 24
     $env_id = commons_events_solr_search_environment();
25 25
   }
26
-  foreach($facets as $facet) {
26
+  foreach ($facets as $facet) {
27 27
     $facet['settings'] = serialize($facet['settings']);
28
-    $facet['name'] = $env_id . $facet['name'];
28
+    $facet['name'] = $env_id.$facet['name'];
29 29
     $facet['searcher'] = $env_id;
30 30
     $merge = db_merge('facetapi')
31 31
       ->key(array('name' => $facet['name']))
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
  * Get the panels subtype for the facet block.
223 223
  */
224 224
 function commons_events_solr_panel_facet_subtype($facet_name) {
225
-  $facet_name = commons_events_solr_search_environment() . ':block:' . $facet_name;
226
-  return 'facetapi-' . facetapi_hash_delta($facet_name);
225
+  $facet_name = commons_events_solr_search_environment().':block:'.$facet_name;
226
+  return 'facetapi-'.facetapi_hash_delta($facet_name);
227 227
 }
228 228
 
229 229
 /**
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
  */
275 275
 function commons_events_solr_environment_form_submit($form, $form_state) {
276 276
   if ($form_state['values']['make_default'] == 1) {
277
-    commons_events_solr_create_facets('apachesolr@' . $form_state['build_info']['args']['0']['env_id']);
277
+    commons_events_solr_create_facets('apachesolr@'.$form_state['build_info']['args']['0']['env_id']);
278 278
     // Need to clear caches so we can rebuild block definitions.
279 279
     cache_clear_all('*', 'cache_block', TRUE);
280 280
     cache_clear_all('*', 'cache_apachesolr', TRUE);
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -16,6 +16,7 @@  discard block
 block discarded – undo
16 16
 /**
17 17
  * Dynamically create facets rather than let Features do it, so we can have
18 18
  * facets based on the current default Solr environment.
19
+ * @param string $env_id
19 20
  */
20 21
 function commons_events_solr_create_facets($env_id = NULL) {
21 22
   $facets = commons_events_solr_facet_definitions();
@@ -220,6 +221,7 @@  discard block
 block discarded – undo
220 221
 
221 222
 /**
222 223
  * Get the panels subtype for the facet block.
224
+ * @param string $facet_name
223 225
  */
224 226
 function commons_events_solr_panel_facet_subtype($facet_name) {
225 227
   $facet_name = commons_events_solr_search_environment() . ':block:' . $facet_name;
Please login to merge, or discard this patch.
modules/commons/commons_events/includes/commons_events.theme.inc 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
     && registration_access('create', $registration, $user, $registration->type)
33 33
     && registration_status('node', $event->nid, TRUE)) {
34 34
     return drupal_get_form('commons_events_attend_event_form_' . $event->nid, $event, $registration, $attendee_count);
35
-  }
36
-  elseif (registration_is_registered($registration, NULL, $user->uid) &&
35
+  } elseif (registration_is_registered($registration, NULL, $user->uid) &&
37 36
     registration_access('delete', $registration, $user, $registration->type)) {
38 37
     $query = new EntityFieldQuery();
39 38
     $query->entityCondition('entity_type', 'registration')
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
   if (!registration_is_registered($registration, NULL, $user->uid)
32 32
     && registration_access('create', $registration, $user, $registration->type)
33 33
     && registration_status('node', $event->nid, TRUE)) {
34
-    return drupal_get_form('commons_events_attend_event_form_' . $event->nid, $event, $registration, $attendee_count);
34
+    return drupal_get_form('commons_events_attend_event_form_'.$event->nid, $event, $registration, $attendee_count);
35 35
   }
36 36
   elseif (registration_is_registered($registration, NULL, $user->uid) &&
37 37
     registration_access('delete', $registration, $user, $registration->type)) {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
       ->propertyCondition('entity_type', 'node');
43 43
     $result = $query->execute();
44 44
 
45
-    return drupal_get_form('commons_events_cancel_event_form_' . $event->nid, $event, $result['registration']);
45
+    return drupal_get_form('commons_events_cancel_event_form_'.$event->nid, $event, $result['registration']);
46 46
   }
47 47
   return "";
48 48
 }
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
  * Theme the event attendees list.
52 52
  */
53 53
 function theme_commons_events_event_attendees($variables = array()) {
54
-  $title = '<p class="commons-events-attendees-title">' . t('Attendees') . '</p>';
54
+  $title = '<p class="commons-events-attendees-title">'.t('Attendees').'</p>';
55 55
   $event_nid = $variables['event_nid'];
56 56
   if (!isset($variables['display'])
57 57
     || $variables['display'] != 'full') {
58
-    return $title . views_embed_view('commons_events_event_attendee_list', 'default', $event_nid)
59
-      . '<p class="commons-events-all-attendees"><a href="/node/' . $event_nid . '/attendees">'
60
-      . t('See all attendees') . '</a></p>';
58
+    return $title.views_embed_view('commons_events_event_attendee_list', 'default', $event_nid)
59
+      . '<p class="commons-events-all-attendees"><a href="/node/'.$event_nid.'/attendees">'
60
+      . t('See all attendees').'</a></p>';
61 61
   }
62
-  return $title . views_embed_view(
62
+  return $title.views_embed_view(
63 63
     'commons_events_event_attendee_list',
64 64
     'commons_events_full_attendee_list',
65 65
     $event_nid);
Please login to merge, or discard this patch.
modules/commons/commons_events/includes/commons_events.forms.inc 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@  discard block
 block discarded – undo
74 74
     || !registration_has_room('node', $form_state['event_node']->nid)) {
75 75
     form_set_error('submit', t('The event you are registering for is unavailable.'));
76 76
     return FALSE;
77
-  }
78
-  elseif (registration_is_registered($form_state['registration'], NULL, $user->uid)) {
77
+  } elseif (registration_is_registered($form_state['registration'], NULL, $user->uid)) {
79 78
     form_set_error('submit', t('You are already registered for this event.'));
80 79
     return FALSE;
81 80
   }
@@ -100,8 +99,7 @@  discard block
 block discarded – undo
100 99
     if (module_exists('commons_follow_node')) {
101 100
       commons_follow_node_follow_node($registration->entity_id, 'event', $user->uid);
102 101
     }
103
-  }
104
-  else {
102
+  } else {
105 103
     drupal_set_message(t('There was an error saving your registration.'));
106 104
   }
107 105
 }
@@ -135,8 +133,7 @@  discard block
 block discarded – undo
135 133
   if ($attendee_count > 1) {
136 134
     // Single attending message.
137 135
     $markup = t('You are attending with @guests', array('@guests' => format_plural($attendee_count, '1 guest', '@count guests')));
138
-  }
139
-  else {
136
+  } else {
140 137
     $markup = t('You are attending.');
141 138
   }
142 139
 
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
  * Commons Events form declarations.
5 5
  */
6 6
 
7
- /**
8
- * Form builder for Attend call to action on events, as long as registration
9
- * is available onsite.
10
- */
7
+  /**
8
+   * Form builder for Attend call to action on events, as long as registration
9
+   * is available onsite.
10
+   */
11 11
 function commons_events_attend_event_form($form, &$form_state, $event_node, $registration = NULL, $attendee_count = 0) {
12 12
   $form_state['event_node'] = $event_node;
13 13
   if (!registration_status('node', $event_node->nid, TRUE)) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     '#markup' => format_plural($attendee_count, '<span class="commons-event-count">1</span> attendee', '<span class="commons-event-count">@count</span> attendees'),
44 44
   );
45 45
   $form['#attached']['css'] = array(
46
-    drupal_get_path('module', 'commons_events') . '/css/commons_events.css',
46
+    drupal_get_path('module', 'commons_events').'/css/commons_events.css',
47 47
   );
48 48
   $form['#attributes'] = array('class' => array('commons-events-form-float'));
49 49
   return $form;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
   $form['#attributes'] = array('class' => array('commons-events-form-float'));
116 116
   $form['#attached']['css'] = array(
117
-    drupal_get_path('module', 'commons_events') . '/css/commons_events.css',
117
+    drupal_get_path('module', 'commons_events').'/css/commons_events.css',
118 118
   );
119 119
   $form['registration'] = array(
120 120
     '#type' => 'value',
Please login to merge, or discard this patch.
modules/commons/commons_events/commons_events.module 2 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -389,8 +389,7 @@  discard block
 block discarded – undo
389 389
     if (!isset($node->uid)) {
390 390
       global $user;
391 391
       $uid = $user->uid;
392
-    }
393
-    else {
392
+    } else {
394 393
       $uid = $node->uid;
395 394
     }
396 395
 
@@ -582,16 +581,14 @@  discard block
 block discarded – undo
582 581
   // If the difference is over a year, use the simple formatter.
583 582
   if ($variables['dates']['value']['db']['object']->difference($variables['dates']['value2']['db']['object'], 'years') > 0) {
584 583
     return theme('commons_events_date_display_range_simple', $variables);
585
-  }
586
-  else {
584
+  } else {
587 585
     if ($variables['dates']['value']['db']['object']->difference($variables['dates']['value2']['db']['object'], 'months') > 0) {
588 586
       $variables['dates']['value']['db']['object']->limitGranularity(array('day', 'month'));
589 587
       $variables['dates']['value2']['db']['object']->limitGranularity(array('day', 'month', 'year'));
590 588
 
591 589
       $date1 = $variables['dates']['value']['db']['object']->format($variables['dates']['format'], FALSE);
592 590
       $date2 = $variables['dates']['value2']['db']['object']->format($variables['dates']['format'], FALSE);
593
-    }
594
-    else {
591
+    } else {
595 592
       if ($variables['dates']['value']['db']['object']->difference($variables['dates']['value2']['db']['object'], 'days') > 0) {
596 593
         // If the Day is before the month (Europe, etc) then switch the granularity.
597 594
         if (strpos($variables['dates']['format'], 'M') != 0 || strpos($variables['dates']['format'], 'm') != 0 ||
@@ -599,8 +596,7 @@  discard block
 block discarded – undo
599 596
         ) {
600 597
           $variables['dates']['value']['db']['object']->limitGranularity(array('day'));
601 598
           $variables['dates']['value2']['db']['object']->limitGranularity(array('day', 'month', 'year'));
602
-        }
603
-        else {
599
+        } else {
604 600
           $variables['dates']['value']['db']['object']->limitGranularity(array('month', 'day'));
605 601
           $variables['dates']['value2']['db']['object']->limitGranularity(array('day', 'year'));
606 602
         }
@@ -613,8 +609,7 @@  discard block
 block discarded – undo
613 609
         if (strpbrk($variables['dates']['format'], 'Dl')) {
614 610
           return theme('commons_events_date_display_range_simple', $variables);
615 611
         }
616
-      }
617
-      else {
612
+      } else {
618 613
         return theme('commons_events_date_display_range_simple', $variables);
619 614
       }
620 615
     }
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
   if ($type == 'node' && isset($build['#node'])) {
204 204
     $node = $build['#node'];
205 205
 
206
-    list(, , $bundle) = entity_extract_ids('node', $node);
206
+    list(,, $bundle) = entity_extract_ids('node', $node);
207 207
 
208 208
     if ($bundle == 'event') {
209 209
       $build['attending'] = array(
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 function commons_events_form_node_form_alter(&$form, &$form_state, $form_id) {
235 235
   $node = $form_state['node'];
236 236
 
237
-  list(, , $bundle) = entity_extract_ids('node', $node);
237
+  list(,, $bundle) = entity_extract_ids('node', $node);
238 238
 
239 239
   if ($bundle == 'event' && empty($node->nid)) {
240 240
     drupal_set_title(t('Create an event'));
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
 
243 243
   if ($bundle == 'event') {
244 244
     // Attach custom CSS and JS to the form.
245
-    $form['#attached']['css'][] = drupal_get_path('module', 'commons_events') . '/css/commons_events.css';
246
-    $form['#attached']['js'][] = drupal_get_path('module', 'commons_events') . '/js/commons_events.js';
245
+    $form['#attached']['css'][] = drupal_get_path('module', 'commons_events').'/css/commons_events.css';
246
+    $form['#attached']['js'][] = drupal_get_path('module', 'commons_events').'/js/commons_events.js';
247 247
 
248 248
     // Remove the '-None-' option from all the dropdowns.
249 249
     unset($form['field_location'][$form['field_location']['#language']]['#options']['_none']);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     // Default the event organizer to the user who is creating the node.
256 256
     if (empty($form['field_organizers'][$form['field_organizers']['#language']]['#default_value'])) {
257 257
       global $user;
258
-      $form['field_organizers'][$form['field_organizers']['#language']]['#default_value'] = format_username($user) . " (" . $user->uid . ")";
258
+      $form['field_organizers'][$form['field_organizers']['#language']]['#default_value'] = format_username($user)." (".$user->uid.")";
259 259
     }
260 260
 
261 261
     // Hide the Registration type field.
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
   if (module_exists('commons_events_solr')) {
445 445
     $options = array(
446 446
       'query' => array(
447
-        'f[1]' => 'sm_og_group_ref:node:' . $group_id,
447
+        'f[1]' => 'sm_og_group_ref:node:'.$group_id,
448 448
       ),
449 449
     );
450 450
 
@@ -465,11 +465,11 @@  discard block
 block discarded – undo
465 465
  */
466 466
 function commons_events_views_post_execute(&$view) {
467 467
   if ($view->name == 'commons_events_upcoming' && $view->current_display == 'panel_pane_1') {
468
-    $view->attachment_after = '<div class="more-link">' . commons_events_upcoming_more_link($view->args[0]) . '</div>';
468
+    $view->attachment_after = '<div class="more-link">'.commons_events_upcoming_more_link($view->args[0]).'</div>';
469 469
   }
470 470
 
471 471
   if ($view->name == 'commons_events_upcoming' && $view->current_display == 'panel_pane_2') {
472
-    $view->attachment_before = '<div class="commons-event-count">' . format_plural(count($view->result), '1 event', '@count events') . '</div>';
472
+    $view->attachment_before = '<div class="commons-event-count">'.format_plural(count($view->result), '1 event', '@count events').'</div>';
473 473
   }
474 474
 }
475 475
 
@@ -542,17 +542,17 @@  discard block
 block discarded – undo
542 542
   if ($date1 == $date2) {
543 543
     // Wrap the result with the attributes.
544 544
     return t('!start-time - !end-time', array(
545
-      '!start-time' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $time1 . '</span>',
546
-      '!end-time' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $time2 . $timezone . '</span>',
545
+      '!start-time' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$time1.'</span>',
546
+      '!end-time' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$time2.$timezone.'</span>',
547 547
     ));
548 548
   }
549 549
 
550 550
   // Wrap the result with the attributes.
551 551
   return t('!start-date to !end-date, !start-time - !end-time', array(
552
-    '!start-date' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $date1 . '</span>',
553
-    '!end-date' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $date2 . '</span>',
554
-    '!start-time' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $time1 . '</span>',
555
-    '!end-time' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $time2 . $timezone . '</span>',
552
+    '!start-date' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$date1.'</span>',
553
+    '!end-date' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$date2.'</span>',
554
+    '!start-time' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$time1.'</span>',
555
+    '!end-time' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$time2.$timezone.'</span>',
556 556
   ));
557 557
 }
558 558
 
@@ -621,10 +621,10 @@  discard block
 block discarded – undo
621 621
   }
622 622
   // Wrap the result with the attributes.
623 623
   return t('!start-date to !end-date, !start-time - !end-time', array(
624
-    '!start-date' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $date1 . '</span>',
625
-    '!end-date' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $date2 . '</span>',
626
-    '!start-time' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $time1 . '</span>',
627
-    '!end-time' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $time2 . $timezone . '</span>',
624
+    '!start-date' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$date1.'</span>',
625
+    '!end-date' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$date2.'</span>',
626
+    '!start-time' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$time1.'</span>',
627
+    '!end-time' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$time2.$timezone.'</span>',
628 628
   ));
629 629
 }
630 630
 
Please login to merge, or discard this patch.
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.