Completed
Push — 7.x-3.x ( 5d65ef...fa8d3d )
by Devin
03:12 queued 26s
created
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.
commons_follow/includes/views/handlers/commons_follow_handler_field_ops.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
       $variables['link_text'] = $flag->get_label($action . '_short', $entity_id);
54 54
 
55 55
       return theme('commons_follow_otheruser_flag', $variables);
56
-    }
57
-    else {
56
+    } else {
58 57
       return parent::render($values);
59 58
     }
60 59
 
Please login to merge, or discard this patch.
themes/commons/commons_origins/template.php 1 patch
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
       foreach($words as &$word) {
39 39
         if(is_numeric($word)) {
40 40
           $word = '<span class="notification-count">' . $word . '</span>';
41
-        }
42
-        else {
41
+        } else {
43 42
           $word = '<span class="notification-label element-invisible">' . $word . '</span>';
44 43
         }
45 44
       }
@@ -321,8 +320,7 @@  discard block
 block discarded – undo
321 320
           if ($name != 'comment_forbidden' && $name != 'answer-add' && !is_string($link['attributes']['class'])) {
322 321
             $link['attributes']['class'][] = 'action-item-small';
323 322
             $link['attributes']['class'][] = 'action-item-inline';
324
-          }
325
-          elseif ($name != 'comment_forbidden' && $name != 'answer-add') {
323
+          } elseif ($name != 'comment_forbidden' && $name != 'answer-add') {
326 324
             $link['attributes']['class'] .= ' action-item-small action-item-inline';
327 325
           }
328 326
         }
@@ -343,8 +341,7 @@  discard block
 block discarded – undo
343 341
     foreach ($chunks as &$chunk) {
344 342
       if ($chunk == $variables['comment_count']) {
345 343
         $chunk = '<span class="action-item-small-append">' . $variables['comment_count'] . '</span>';
346
-      }
347
-      else {
344
+      } else {
348 345
         $chunk = '<span class="element-invisible">' . $chunk . '</span>';
349 346
       }
350 347
     }
@@ -473,8 +470,7 @@  discard block
 block discarded – undo
473 470
     // Style the flag links like buttons.
474 471
     if ($variables['action'] == 'flagged') {
475 472
       $variables['flag_classes_array'][] = 'action-item-small-active';
476
-    }
477
-    else {
473
+    } else {
478 474
       $variables['flag_classes_array'][] = 'action-item-small';
479 475
     }
480 476
     $variables['flag_classes'] = implode(' ', $variables['flag_classes_array']);
@@ -612,8 +608,7 @@  discard block
 block discarded – undo
612 608
   foreach ($view->result as $id => $result) {
613 609
     if (isset($result->node_type)) {
614 610
       $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-' . $result->node_type);
615
-    }
616
-    else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') {
611
+    } else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') {
617 612
       $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-event');
618 613
     }
619 614
   }
@@ -651,8 +646,7 @@  discard block
 block discarded – undo
651 646
   // Roll the classes into the attributes.
652 647
   if (empty($variables['attributes_array']['class'])) {
653 648
     $variables['attributes_array']['class'] = $variables['classes_array'];
654
-  }
655
-  else {
649
+  } else {
656 650
     $variables['attributes_array']['class'] = array_merge($variables['attributes_array']['class'], $variables['classes_array']);
657 651
   }
658 652
 
@@ -834,8 +828,7 @@  discard block
 block discarded – undo
834 828
     return '<span class="' . $classes . '" id="rate-button-' . $id . '">' .
835 829
       '<span class="element-invisible">' . check_plain($text) . '</span>' .
836 830
       '</span>';
837
-  }
838
-  else {
831
+  } else {
839 832
     return '<a class="' . $classes . '" id="rate-button-' . $id . '" rel="nofollow" href="' . htmlentities($href) . '" title="' . check_plain($text) . '">' .
840 833
       '<span class="element-invisible">' . check_plain($text) . '</span>' .
841 834
       '</a>';
@@ -851,8 +844,7 @@  discard block
 block discarded – undo
851 844
   if (is_array($form['#theme'])) {
852 845
     $hooks = array('form_content');
853 846
     $form['#theme'] = array_merge($form['#theme'], $hooks);
854
-  }
855
-  else {
847
+  } else {
856 848
     $form['#theme'] = array(
857 849
       $form['#theme'],
858 850
       'form_content',
@@ -1000,8 +992,7 @@  discard block
 block discarded – undo
1000 992
         if (isset($link['href'])) {
1001 993
           // Pass in $link as $options, they share the same keys.
1002 994
           $output .= l($link['title'], $link['href'], $link);
1003
-        }
1004
-        elseif (!empty($link['title'])) {
995
+        } elseif (!empty($link['title'])) {
1005 996
           // Some links are actually not links, but we wrap these in <span> for adding title and class attributes.
1006 997
           if (empty($link['html'])) {
1007 998
             $link['title'] = check_plain($link['title']);
@@ -1098,8 +1089,7 @@  discard block
 block discarded – undo
1098 1089
         }
1099 1090
         if (isset($item['#href']) && strpos($item['#href'], 'messages')) {
1100 1091
           $item['#options']['attributes']['class'][] = 'message-contact';
1101
-        }
1102
-        elseif (isset($item['#href'])) {
1092
+        } elseif (isset($item['#href'])) {
1103 1093
           $item['#options']['attributes']['class'][] = 'trusted-status-request';
1104 1094
         }
1105 1095
       }
@@ -1118,8 +1108,7 @@  discard block
 block discarded – undo
1118 1108
 
1119 1109
   if (!isset($element['#value'])) {
1120 1110
     return '<' . $element['#tag'] . $attributes . " />\n";
1121
-  }
1122
-  else {
1111
+  } else {
1123 1112
     $output = '<' . $element['#tag'] . $attributes . '>';
1124 1113
     if (isset($element['#value_prefix'])) {
1125 1114
       $output .= $element['#value_prefix'];
@@ -1152,8 +1141,7 @@  discard block
 block discarded – undo
1152 1141
     if (isset($item['#type']) && $item['#type'] == 'link') {
1153 1142
       if (strpos($item['#href'], '/subscribe')) {
1154 1143
         $item['#options']['attributes']['class'][] = 'action-item-primary';
1155
-      }
1156
-      else {
1144
+      } else {
1157 1145
         $item['#options']['attributes']['class'][] = 'action-item';
1158 1146
       }
1159 1147
     }
@@ -1181,8 +1169,7 @@  discard block
 block discarded – undo
1181 1169
     // validating that the administrative area has been populated.
1182 1170
     if (!empty($address['#address']['administrative_area'])) {
1183 1171
       _commons_origins_format_address($address);
1184
-    }
1185
-    else {
1172
+    } else {
1186 1173
       // Deny access to incomplete addresses.
1187 1174
       $address['#access'] = FALSE;
1188 1175
     }
@@ -1220,8 +1207,7 @@  discard block
 block discarded – undo
1220 1207
         // If an address is incomplete, remove it and tell the system a
1221 1208
         // rebuild is needed.
1222 1209
         unset($variables['row']->field_field_address[$key]);
1223
-      }
1224
-      else {
1210
+      } else {
1225 1211
         _commons_origins_format_address($address['rendered']);
1226 1212
       }
1227 1213
     }
@@ -1294,8 +1280,7 @@  discard block
 block discarded – undo
1294 1280
   if (module_exists('timeago') && variable_get('timeago_node', 1)) {
1295 1281
     $variables['date'] = timeago_format_date($node->created, $variables['date']);
1296 1282
     $use_timeago_date_format = TRUE;
1297
-  }
1298
-  else {
1283
+  } else {
1299 1284
     $use_timeago_date_format = FALSE;
1300 1285
   }
1301 1286
 
@@ -1318,16 +1303,13 @@  discard block
 block discarded – undo
1318 1303
       $placeholders['!group'] = l($wrapper->{OG_AUDIENCE_FIELD}->get(0)->label(), 'node/' . $wrapper->{OG_AUDIENCE_FIELD}->get(0)->getIdentifier());
1319 1304
       if ($use_timeago_date_format == TRUE) {
1320 1305
         $variables['submitted'] = t('!type created !date in the !group group by !user', $placeholders);
1321
-      }
1322
-      else {
1306
+      } else {
1323 1307
         $variables['submitted'] = t('!type created @interval ago in the !group group by !user', $placeholders);
1324 1308
       }
1325
-    }
1326
-    else {
1309
+    } else {
1327 1310
       if ($use_timeago_date_format == TRUE) {
1328 1311
         $variables['submitted'] = t('!type created !date by !user', $placeholders);
1329
-      }
1330
-      else {
1312
+      } else {
1331 1313
         $variables['submitted'] = t('!type created @interval ago by !user', $placeholders);
1332 1314
       }
1333 1315
     }
Please login to merge, or discard this patch.