Completed
Push — master ( e5204d...1b0b82 )
by Megh
04:17
created
src/app/views/templates/event/index.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,11 +41,14 @@  discard block
 block discarded – undo
41 41
                         <?php $datetime = date_parse($start_time); ?>
42 42
                         <?php if ($datetime['error_count']): ?>
43 43
                             <?= __($start_time) ?>
44
-                        <?php else: ?>
44
+                        <?php else {
45
+    : ?>
45 46
                             <a class="date-time" target="_blank" href="http://www.timeanddate.com/worldclock/fixedtime.html?day=<?= $datetime['day']?>&month=<?= $datetime['month']?>&year=<?= $datetime['year']?>&hour=<?= $datetime['hour']?>&min=<?= $datetime['minute']?>&sec=<?= $datetime['second']?>&p1=505&msg=<?= urlencode($name) ?>">
46 47
                                 <?= $start_time ?>
47 48
                             </a>
48
-                        <?php endif; ?>
49
+                        <?php endif;
50
+}
51
+?>
49 52
                     </div>
50 53
                 </div>
51 54
                 <div class="row padded">
@@ -56,11 +59,14 @@  discard block
 block discarded – undo
56 59
                         <?php $datetime = date_parse($end_time); ?>
57 60
                         <?php if ($datetime['error_count']): ?>
58 61
                             <?= __($end_time) ?>
59
-                        <?php else: ?>
62
+                        <?php else {
63
+    : ?>
60 64
                             <a class="date-time" target="_blank" href="http://www.timeanddate.com/worldclock/fixedtime.html?day=<?= $datetime['day']?>&month=<?= $datetime['month']?>&year=<?= $datetime['year']?>&hour=<?= $datetime['hour']?>&min=<?= $datetime['minute']?>&sec=<?= $datetime['second']?>&p1=505&msg=<?= urlencode($name) ?>">
61 65
                                 <?= $end_time ?>
62 66
                             </a>
63
-                        <?php endif; ?>
67
+                        <?php endif;
68
+}
69
+?>
64 70
                     </div>
65 71
                 </div>
66 72
                 <div class="row padded">
Please login to merge, or discard this patch.
src/app/views/templates/schedule/index.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@  discard block
 block discarded – undo
6 6
     usort($events_list, function($a, $b) {
7 7
         if (!isset($b['data']['start_time'])) {
8 8
             return -1;
9
-        }
10
-        else if (!isset($a['data']['start_time'])) {
9
+        } else if (!isset($a['data']['start_time'])) {
11 10
             return 1;
12 11
         }
13 12
         $a_date = $a['data']['start_time'];
@@ -18,8 +17,7 @@  discard block
 block discarded – undo
18 17
         if ($a_enddate >= $now xor $b_enddate >= $now) {
19 18
             if ($a_enddate >= $now) {
20 19
                 return -1;
21
-            }
22
-            else {
20
+            } else {
23 21
                 return 1;
24 22
             }
25 23
         }
@@ -148,9 +146,12 @@  discard block
 block discarded – undo
148 146
                             <td class="day">
149 147
                                 <?= $formatted ?>
150 148
                             </td>
151
-                        <?php else: ?>
149
+                        <?php else {
150
+    : ?>
152 151
                             <td class="day repeat-day hidden"><?= $formatted ?></td>
153
-                        <?php endif; ?>
152
+                        <?php endif;
153
+}
154
+?>
154 155
                         <td class="event-container">
155 156
                             <a href="<?= locale_base_url() . $event['path'] ?>" class="event">
156 157
                                 <div class="circle"><div class="innercircle"></div></div>
Please login to merge, or discard this patch.
src/app/views/skeleton_template/header.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,12 +61,18 @@
 block discarded – undo
61 61
         <?php if ($is_authenticated): ?>
62 62
             <?php if (!empty($user_nick)): ?>
63 63
                 <div class="nick"><?= sprintf(__('Hello, %s'), $user_nick) ?> <a href="<?= locale_base_url() . "logout/" ?>"><?= __('Logout') ?></a></div>
64
-            <?php else: ?>
64
+            <?php else {
65
+    : ?>
65 66
                 <div><a href="<?= locale_base_url() . "login/" ?>" class="pure-button btn"><?= __('Login / Register') ?></a></div>
66
-            <?php endif; ?>
67
-        <?php else: ?>
67
+            <?php endif;
68
+}
69
+?>
70
+        <?php else {
71
+    : ?>
68 72
             <div><a href="<?= locale_base_url() . "login/" ?>" class="pure-button btn"><?= __('Login / Register') ?></a></div>
69
-        <?php endif; ?>
73
+        <?php endif;
74
+}
75
+?>
70 76
     </div>
71 77
     <?php endif; ?>
72 78
     <div id="container" class="wrapper" style="z-index: 4;">
Please login to merge, or discard this patch.