@@ -74,8 +74,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -4,10 +4,10 @@ |
||
| 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)) { |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_events.features.og_features_permission.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_events.features.og_features_permission.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_og_features_default_permissions(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_events.features.user_permission.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_events.features.user_permission.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_user_default_permissions(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_events.pages_default.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_events.pages_default.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_default_page_manager_pages(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_events.features.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_events.features.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_ctools_plugin_api(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_events.features.field_instance.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_events.features.field_instance.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_field_default_field_instances(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * Drupal Commons Events feature. |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * Drupal Commons Events feature. |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | include_once 'commons_events.features.inc'; |
| 8 | 8 | |
@@ -203,7 +203,7 @@ discard block |
||
| 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 |
||
| 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')); |
@@ -389,8 +389,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_events.features.field_base.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_events.features.field_base.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_field_default_field_bases(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_body.features.field_base.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_body.features.field_base.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_field_default_field_bases(). |