Completed
Push — master ( e5204d...1b0b82 )
by Megh
04:17
created
src/app/views/trash.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,9 +34,12 @@  discard block
 block discarded – undo
34 34
                                     <span class="pull-left">
35 35
                                         <?php if ($file['type'] == 'file'): ?>
36 36
                                             <i class="fa fa-file-text-o"></i>
37
-                                        <?php else: ?>
37
+                                        <?php else {
38
+    : ?>
38 39
                                             <i class="fa fa-folder-o"></i>
39
-                                        <?php endif; ?>
40
+                                        <?php endif;
41
+}
42
+?>
40 43
                                         <?= $file['slug'] ?>
41 44
                                         <span class="grey"><?= $file['path'] ?></span><br>
42 45
                                         <span class="grey">
@@ -58,11 +61,13 @@  discard block
 block discarded – undo
58 61
                                                 </button>
59 62
                                             </form>
60 63
                                         <?php
61
-                                            else:
64
+                                            else {
65
+                                                :
62 66
                                         ?>
63 67
                                             <span class="grey"><?= $file['reason'] ?></span>
64 68
                                         <?php
65 69
                                             endif;
70
+                                            }
66 71
                                         ?>
67 72
                                     </span>
68 73
                                 </li>
Please login to merge, or discard this patch.
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/category/index.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
 usort($events_to_display, function ($e1, $e2) {
16 16
     if (!$e2['data']['start_time']) {
17 17
         return -1;
18
-    }
19
-    else if (!$e1['data']['start_time']) {
18
+    } else if (!$e1['data']['start_time']) {
20 19
         return 1;
21 20
     }
22 21
     return strcmp($e1['data']['start_time'], $e2['data']['start_time']);
@@ -44,9 +43,12 @@  discard block
 block discarded – undo
44 43
                             <p><small><?= ($d = $event['data']['start_time']) ? strftime('%B %e', date_timestamp_get(date_create($d))) : __('To be announced') ?></small></p>
45 44
                         </a>
46 45
                     <?php endforeach; ?>
47
-                <?php else: ?>
46
+                <?php else {
47
+    : ?>
48 48
                     Coming soon
49
-                <?php endif; ?>
49
+                <?php endif;
50
+}
51
+?>
50 52
             </div>
51 53
         </div>
52 54
     </div>
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/user_edit.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@  discard block
 block discarded – undo
51 51
                     ?>
52 52
                         <span class="grey">(It's you)</span>
53 53
                     <?php
54
-                        else:
54
+                        else {
55
+                            :
55 56
                     ?>
56 57
                         <form action="" method="post" style="display: inline-block;">
57 58
                             <input type="hidden" name="file_id" value="<?= $id ?>"/>
@@ -63,6 +64,7 @@  discard block
 block discarded – undo
63 64
                         </form>
64 65
                     <?php
65 66
                         endif;
67
+                        }
66 68
                     ?>
67 69
                 </li>
68 70
         <?php
Please login to merge, or discard this patch.
src/app/views/sap/navbar_fragment.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,9 +6,12 @@
 block discarded – undo
6 6
             <li><a href="<?= base_url() ?>sap/portal/">Dashboard</a></li>
7 7
             <li><a href="<?= base_url() ?>sap/portal/leaderboard">Leaderboard</a></li>
8 8
             <li><a href="<?= base_url() ?>sap/logout/">Logout</a></li>
9
-        <?php else: ?>
9
+        <?php else {
10
+    : ?>
10 11
             <li><a href="<?= base_url() ?>sap/login/">Login</a></li>
11
-        <?php endif; ?>
12
+        <?php endif;
13
+}
14
+?>
12 15
     </ul>
13 16
     <a href="javascript:void(0)" class="menu-toggle-button">&equiv;</a>
14 17
     </a>
Please login to merge, or discard this patch.
src/app/views/sap/confirm_users.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,8 @@  discard block
 block discarded – undo
64 64
                                 <input type="hidden" name="user-id" value="<?= $user['id'] ?>">
65 65
                                 <button class="btn btn-green">Resend email</button>
66 66
                             </form>
67
-                        <?php else: ?>
67
+                        <?php else {
68
+    : ?>
68 69
                             <form method="post"
69 70
                                 action="<?= base_url() ?>sap/portal/users/approve/<?= $user['id'] ?>"
70 71
                                 onsubmit="return confirm('Are you sure you want to approve <?= htmlspecialchars($user['name']) ?>?')">
@@ -82,6 +83,8 @@  discard block
 block discarded – undo
82 83
             <?php endforeach ?>
83 84
         </table>
84 85
     </div>
85
-    <?php $this->load_fragment('google_analytics'); ?>
86
+    <?php $this->load_fragment('google_analytics');
87
+}
88
+?>
86 89
 </body>
87 90
 </html>
Please login to merge, or discard this patch.
src/app/views/sap/emails/submission_reviewed_email_text.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@  discard block
 block discarded – undo
15 15
 
16 16
 An admin has approved your submission! :D
17 17
 
18
-<?php else: ?>
18
+<?php else {
19
+    : ?>
19 20
 
20 21
 Unfortunately, an admin has rejected your submission. :/
21 22
 
@@ -24,7 +25,9 @@  discard block
 block discarded – undo
24 25
 
25 26
 <?= $reason ?>
26 27
 
27
-<?php endif; ?>
28
+<?php endif;
29
+}
30
+?>
28 31
 <?php endif; ?>
29 32
 
30 33
 Link to mission: <?= $mission_url?>
Please login to merge, or discard this patch.
src/app/views/sap/emails/submission_reviewed_email_html.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,14 +24,17 @@
 block discarded – undo
24 24
         <?php endif; ?>
25 25
         <?php if ($approved): ?>
26 26
             <p>An admin has approved your submission! :D</p>
27
-        <?php else: ?>
27
+        <?php else {
28
+    : ?>
28 29
             <p>Unfortunately, an admin has rejected your submission. :/</p>
29 30
             <?php if (isset($reason)): ?>
30 31
                 <p>The reason given was:</p>
31 32
                 <blockquote>
32 33
                     <?= $reason ?>
33 34
                 </blockquote>
34
-            <?php endif; ?>
35
+            <?php endif;
36
+}
37
+?>
35 38
         <?php endif; ?>
36 39
         <p>Link to mission: <a href="<?= $mission_url ?>"><?= $mission_url?> </a></p>
37 40
         <p>
Please login to merge, or discard this patch.