@@ -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 | } |
@@ -130,8 +130,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -79,8 +79,7 @@ |
||
| 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 | } |
@@ -263,8 +263,7 @@ |
||
| 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 | } |