Completed
Push — 7.x-3.x ( daa35d...1b5187 )
by Devin
03:09
created
commons_follow/commons_follow_user/commons_follow_user.views_default.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -343,7 +343,7 @@
 block discarded – undo
343 343
   $handler->display->display_options['style_options']['wrapper_class'] = 'view-profile-badges';
344 344
   $handler->display->display_options['row_plugin'] = 'fields';
345 345
   $handler->display->display_options['row_options']['hide_empty'] = TRUE;
346
-  $handler->display->display_options['row_options']['default_field_elements'] = FALSE;  /* No results behavior: Global: Text area */
346
+  $handler->display->display_options['row_options']['default_field_elements'] = FALSE; /* No results behavior: Global: Text area */
347 347
   $handler->display->display_options['empty']['area']['id'] = 'area';
348 348
   $handler->display->display_options['empty']['area']['table'] = 'views';
349 349
   $handler->display->display_options['empty']['area']['field'] = 'area';
Please login to merge, or discard this patch.
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.
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
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
       'title' => t('Log out'),
23 23
       'weight' => 9,
24 24
     );
25
-  }
26
-  else {
25
+  } else {
27 26
     if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
28 27
       $links['signup'] = array(
29 28
         'href' => 'user/register',
Please login to merge, or discard this patch.
modules/commons/commons_documents/commons_documents.module 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 function commons_documents_form_node_form_alter(&$form, &$form_state, $form_id) {
13 13
   $node = $form['#node'];
14 14
 
15
-  list(, , $bundle) = entity_extract_ids('node', $node);
15
+  list(,, $bundle) = entity_extract_ids('node', $node);
16 16
 
17 17
   if ($bundle == 'document' && empty($node->nid)) {
18 18
     drupal_set_title(t('Create a document'));
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.