@@ -8,11 +8,11 @@ |
||
8 | 8 | $events_to_display = []; |
9 | 9 | |
10 | 10 | foreach ($events_data as $event) { |
11 | - if ( substr($event['path'], 1, $len) == $page_slug && $event['template'] == 'event' ) { |
|
11 | + if (substr($event['path'], 1, $len) == $page_slug && $event['template'] == 'event') { |
|
12 | 12 | $events_to_display[] = $event; |
13 | 13 | } |
14 | 14 | } |
15 | -usort($events_to_display, function ($e1, $e2) { |
|
15 | +usort($events_to_display, function($e1, $e2) { |
|
16 | 16 | if (!$e2['data']['start_time']) { |
17 | 17 | return -1; |
18 | 18 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php $this->load_fragment('skeleton_template/header', ['title' => __('Events')]); ?> |
2 | 2 | <?php |
3 | - $events_list = array_filter($events_data, function ($event) { |
|
3 | + $events_list = array_filter($events_data, function($event) { |
|
4 | 4 | return $event['template'] == 'event'; |
5 | 5 | }); |
6 | 6 | usort($events_list, function($a, $b) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $b_date = $b['data']['start_time']; |
15 | 15 | $a_enddate = $a['data']['end_time']; |
16 | 16 | $b_enddate = $b['data']['end_time']; |
17 | - $now=@date('Y-m-d H:i'); |
|
17 | + $now = @date('Y-m-d H:i'); |
|
18 | 18 | if ($a_enddate >= $now xor $b_enddate >= $now) { |
19 | 19 | if ($a_enddate >= $now) { |
20 | 20 | return -1; |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | $evref['path'] = substr($evref['path'], 1); |
35 | 35 | $evref['type'] = substr($evref['path'], 0, - (strlen($evref['slug']) + 2)); |
36 | 36 | $cur = date_parse($evref['data']['start_time']); |
37 | - array_push($dates, $cur['month']."-".$cur['day']); |
|
37 | + array_push($dates, $cur['month'] . "-" . $cur['day']); |
|
38 | 38 | } |
39 | 39 | $is_imp = function($date) use ($dates) { |
40 | - if ( in_array($date, $dates) ) { |
|
40 | + if (in_array($date, $dates)) { |
|
41 | 41 | echo " class='has-event'"; |
42 | 42 | } |
43 | 43 | }; |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | <div id = "categoriesnav" class="linkholder"> |
53 | 53 | <div class="categories"> |
54 | 54 | <?php |
55 | - foreach ($events_list as $event){ |
|
56 | - $cat[$event['type']]=1; |
|
55 | + foreach ($events_list as $event) { |
|
56 | + $cat[$event['type']] = 1; |
|
57 | 57 | } |
58 | 58 | foreach ($cat as $key => $value): |
59 | 59 | ?> |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | <?php if (isset($mission['description'])): ?> |
22 | 22 | <p><?= linkify(nl2br(htmlspecialchars($mission['description']))) ?></p> |
23 | 23 | <?php endif; ?> |
24 | - <?php if(!$mission['published']): ?> |
|
24 | + <?php if (!$mission['published']): ?> |
|
25 | 25 | <p>This mission is unpublished.</p> |
26 | 26 | <form method="post" action="./publish"> |
27 | 27 | <button type="submit" class="btn btn-red">Publish mission</button> |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | </strong> |
41 | 41 | </p> |
42 | 42 | <?php if ($is_admin): ?> |
43 | - <?php if(!$mission['published']): ?> |
|
43 | + <?php if (!$mission['published']): ?> |
|
44 | 44 | <a href="./createtask/" class="btn btn-green">Create new task</a> |
45 | 45 | <?php endif; ?> |
46 | 46 | <a href="../../review/mission/<?= $mission['id'] ?>/" class="btn btn-blue"> |
@@ -22,7 +22,7 @@ |
||
22 | 22 | foreach ($user_scores as $user_score) { |
23 | 23 | $name = $user_score['name']; |
24 | 24 | $score = $user_score['score']; |
25 | - if ($score_prev > $score){ |
|
25 | + if ($score_prev > $score) { |
|
26 | 26 | $score_prev = $score; |
27 | 27 | $rank += 1; |
28 | 28 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - $this->load_fragment('auth/form_header', ['heading' => __('Forgot your password?') ]); |
|
2 | + $this->load_fragment('auth/form_header', ['heading' => __('Forgot your password?')]); |
|
3 | 3 | ?> |
4 | 4 | <?php if ($sent): ?> |
5 | 5 | <div class="success"><?= __('Mail sent!') ?></div> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - $this->load_fragment('auth/form_header', ['heading' => __('Email successfully verified!') ]); |
|
2 | + $this->load_fragment('auth/form_header', ['heading' => __('Email successfully verified!')]); |
|
3 | 3 | ?> |
4 | 4 | <div class="row"> |
5 | 5 | <div class="col6 offset3 text-center"> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - $this->load_fragment('auth/form_header', ['heading' => __('Register') ]); |
|
2 | + $this->load_fragment('auth/form_header', ['heading' => __('Register')]); |
|
3 | 3 | ?> |
4 | 4 | <?php if ($sent): ?> |
5 | 5 | <div class="text-center"> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - $this->load_fragment('auth/form_header', ['heading' => __('Email Verification Required') ]); |
|
2 | + $this->load_fragment('auth/form_header', ['heading' => __('Email Verification Required')]); |
|
3 | 3 | ?> |
4 | 4 | <div class="row"> |
5 | 5 | <div class="col6 offset3 text-center"> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | $button_action = __('Confirm'); |
9 | 9 | $message = __("If you change your email, we will send an email to the new address to verify it."); |
10 | 10 | } |
11 | - $this->load_fragment('auth/form_header', ['heading' => __('Welcome!') ]); |
|
11 | + $this->load_fragment('auth/form_header', ['heading' => __('Welcome!')]); |
|
12 | 12 | ?> |
13 | 13 | <div> |
14 | 14 | <p><?= $heading ?></p> |