Completed
Branch 7.x-3.x (9d48fc)
by Devin
04:36
created
modules/commons/commons_events/includes/commons_events.theme.inc 1 patch
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.
modules/commons/commons_events/includes/commons_events.forms.inc 1 patch
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.
modules/commons/commons_events/commons_events.module 1 patch
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.
modules/commons/commons_q_a/commons_q_a.module 1 patch
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.