Completed
Push — master ( c28ce4...f8f581 )
by Christopher
14:59 queued 07:10
created
api-classes/User.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
         $currentTimestamp = $date = strftime('%F %T', time());
29 29
 
30 30
         $data = [
31
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
32
-      ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
33
-      ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
34
-      ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
35
-      ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()],
36
-      ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
37
-      ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
31
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
32
+        ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
33
+        ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
34
+        ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
35
+        ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()],
36
+        ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
37
+        ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
38 38
     ];
39 39
 
40 40
         if (isset($this->notes)) {
Please login to merge, or discard this patch.
api-classes/Database.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -272,8 +272,8 @@
 block discarded – undo
272 272
     public function count($table, $column, $where = null)
273 273
     {
274 274
         $columns = [
275
-      'COUNT('.$column.') AS count',
276
-     ];
275
+        'COUNT('.$column.') AS count',
276
+        ];
277 277
         $statement = $this->selectStatement($table, $columns, $where);
278 278
 
279 279
         return $statement->fetchObject()->count;
Please login to merge, or discard this patch.
api-classes/Event.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
         $currentTimestamp = $date = strftime('%F %T', time());
132 132
 
133 133
         $data = [
134
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
135
-      ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
136
-      ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
137
-      ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
138
-      ['field' => 'subType', 'type' => 'int', 'value' => $this->subType->getId()],
139
-      ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
140
-      ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
134
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
135
+        ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
136
+        ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
137
+        ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
138
+        ['field' => 'subType', 'type' => 'int', 'value' => $this->subType->getId()],
139
+        ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
140
+        ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
141 141
     ];
142 142
 
143 143
         if (isset($this->notes)) {
@@ -164,23 +164,23 @@  discard block
 block discarded – undo
164 164
         }
165 165
 
166 166
         $columns = [
167
-      'id',
168
-      'name',
169
-      'date',
170
-      'eventGroup',
171
-      'type',
172
-      'subType',
173
-      'location',
174
-      'comment',
175
-      'sermonTitle',
176
-      'bibleVerse',
177
-      'deleted',
178
-      'created',
179
-      'updated',
167
+        'id',
168
+        'name',
169
+        'date',
170
+        'eventGroup',
171
+        'type',
172
+        'subType',
173
+        'location',
174
+        'comment',
175
+        'sermonTitle',
176
+        'bibleVerse',
177
+        'deleted',
178
+        'created',
179
+        'updated',
180 180
     ];
181 181
 
182 182
         $where = [
183
-      'id = '.$id,
183
+        'id = '.$id,
184 184
     ];
185 185
 
186 186
         $result = $db->selectSingle('Event', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
generated-classes/TechWilk/Rota/User.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         if (!password_verify($v, $this->password)) {
35 35
             $bcrypt_options = [
36 36
         'cost' => 12,
37
-      ];
37
+        ];
38 38
             $this->password = password_hash($v, PASSWORD_BCRYPT, $bcrypt_options);
39 39
 
40 40
             $this->modifiedColumns[UserTableMap::COL_PASSWORD] = true;
Please login to merge, or discard this patch.
public/old/index.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
     <div class="col-sm-8 col-md-8 col-lg-6">
178 178
 
179 179
       <?php
180
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181
-      // ~~~~~~~~ Events this week ~~~~~~~~
182
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183
-      ?>
180
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181
+        // ~~~~~~~~ Events this week ~~~~~~~~
182
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183
+        ?>
184 184
 
185 185
       <h2>Events this week:</h2>
186 186
 
@@ -204,17 +204,17 @@  discard block
 block discarded – undo
204 204
             <div class="timeline-header">
205 205
               <a href="event.php?id=<?php echo $event->getId() ?>">
206 206
                 <h4><?php
207
-                  echo $event->getDate('jS: ');
208
-                  $eventPeople = EventPersonQuery::create()->filterByEvent($event)->find();
209
-                  $roles = [];
210
-                  foreach ($eventPeople as $eventPerson) {
211
-                      if ($eventPerson->getUserRole()->getUserId() == $user->getId()) {
212
-                          $roles[] = $eventPerson->getUserRole()->getRole()->getName();
213
-                      }
214
-                  }
215
-                  $roles = implode(', ', $roles);
216
-                  echo $roles != '' ? $roles : 'No involvement';
217
-                  ?>
207
+                    echo $event->getDate('jS: ');
208
+                    $eventPeople = EventPersonQuery::create()->filterByEvent($event)->find();
209
+                    $roles = [];
210
+                    foreach ($eventPeople as $eventPerson) {
211
+                        if ($eventPerson->getUserRole()->getUserId() == $user->getId()) {
212
+                            $roles[] = $eventPerson->getUserRole()->getRole()->getName();
213
+                        }
214
+                    }
215
+                    $roles = implode(', ', $roles);
216
+                    echo $roles != '' ? $roles : 'No involvement';
217
+                    ?>
218 218
                 </h4>
219 219
               </a>
220 220
               <a class="label label-default" href="events.php?view=all&filter=<?php echo $event->getEventTypeId() ?>"><?php echo $event->getEventType()->getName() ?></a>
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                 <div class="modal-body">
270 270
                   <?php
271 271
 
272
-                  $sqlPeople = "SELECT
272
+                    $sqlPeople = "SELECT
273 273
                                 CONCAT(u.firstname, ' ', u.lastname) AS `name`,
274 274
                                 r.name AS `rolename`,
275 275
                                 ep.notified AS `notified`,
@@ -285,13 +285,13 @@  discard block
 block discarded – undo
285 285
                                   AND ep.removed = 0
286 286
                                 ORDER BY g.name, r.name";
287 287
 
288
-                  $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db()));
289
-                  $groupName = '';
290
-                  $groupId = 0;
291
-                  $identifier = '1';
292
-                  $firstTime = true;
288
+                    $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db()));
289
+                    $groupName = '';
290
+                    $groupId = 0;
291
+                    $identifier = '1';
292
+                    $firstTime = true;
293 293
 
294
-                  if (mysqli_num_rows($resultPeople) > 0):
294
+                    if (mysqli_num_rows($resultPeople) > 0):
295 295
 
296 296
                     ?>
297 297
                     <?php while ($viewPeople = mysqli_fetch_object($resultPeople)) {
@@ -324,9 +324,9 @@  discard block
 block discarded – undo
324 324
                         echo '</li>';
325 325
                     }
326 326
                     echo '</ul>';
327
-                  else:
327
+                    else:
328 328
                     echo '<p>No roles assigned to this event.';
329
-                  endif;
329
+                    endif;
330 330
                 ?>
331 331
                 </div>
332 332
                 <div class="modal-footer">
@@ -360,10 +360,10 @@  discard block
 block discarded – undo
360 360
 
361 361
 
362 362
       <?php
363
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
364
-      // ~~~~~~~~~ User's events ~~~~~~~~~~
365
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
366
-      ?>
363
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
364
+        // ~~~~~~~~~ User's events ~~~~~~~~~~
365
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
366
+        ?>
367 367
 
368 368
       <h2>My events:</h2>
369 369
 
@@ -388,9 +388,9 @@  discard block
 block discarded – undo
388 388
             <div class="timeline-header">
389 389
               <a href="event.php?id=<?php echo $event->id ?>">
390 390
                 <h4><?php
391
-                  echo date('jS: ', strtotime($event->date));
392
-                  echo $event->roles;
393
-                  ?>
391
+                    echo date('jS: ', strtotime($event->date));
392
+                    echo $event->roles;
393
+                    ?>
394 394
                 </h4>
395 395
               </a>
396 396
               <a class="label label-default" href="events.php?view=all&filter=<?php echo $event->eventTypeId ?>"><?php echo $event->eventType ?></a>
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
                 <div class="modal-body">
447 447
                   <?php
448 448
 
449
-                  $sqlPeople = "SELECT
449
+                    $sqlPeople = "SELECT
450 450
                                 CONCAT(u.firstname, ' ', u.lastname) AS `name`,
451 451
                                 r.name AS `rolename`,
452 452
                                 ep.notified AS `notified`,
@@ -462,13 +462,13 @@  discard block
 block discarded – undo
462 462
                                   AND ep.removed = 0
463 463
                                 ORDER BY g.name, r.name";
464 464
 
465
-                  $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db()));
466
-                  $groupName = '';
467
-                  $groupId = 0;
468
-                  $identifier = '1';
469
-                  $firstTime = true;
465
+                    $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db()));
466
+                    $groupName = '';
467
+                    $groupId = 0;
468
+                    $identifier = '1';
469
+                    $firstTime = true;
470 470
 
471
-                  if (mysqli_num_rows($resultPeople) > 0):
471
+                    if (mysqli_num_rows($resultPeople) > 0):
472 472
 
473 473
                     ?>
474 474
                     <?php while ($viewPeople = mysqli_fetch_object($resultPeople)) {
@@ -501,9 +501,9 @@  discard block
 block discarded – undo
501 501
                         echo '</li>';
502 502
                     }
503 503
                     echo '</ul>';
504
-                  else:
504
+                    else:
505 505
                     echo '<p>No roles assigned to this event.';
506
-                  endif;
506
+                    endif;
507 507
                 ?>
508 508
                 </div>
509 509
                 <div class="modal-footer">
@@ -538,10 +538,10 @@  discard block
 block discarded – undo
538 538
     <div class="col-sm-4 col-md-4 col-lg-6">
539 539
 
540 540
       <?php
541
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
542
-      // ~~~~~~~ Remaining events ~~~~~~~~~
543
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
544
-      ?>
541
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
542
+        // ~~~~~~~ Remaining events ~~~~~~~~~
543
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
544
+        ?>
545 545
       <?php if (isset($remainingEventsInGroups)): ?>
546 546
 
547 547
       <div class="row">
@@ -617,10 +617,10 @@  discard block
 block discarded – undo
617 617
 
618 618
 
619 619
       <?php
620
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
621
-      // ~~~~~~~~~ User details ~~~~~~~~~~~
622
-      // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
623
-      ?>
620
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
621
+        // ~~~~~~~~~ User details ~~~~~~~~~~~
622
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
623
+        ?>
624 624
 
625 625
       <div class="box box-widget widget-user-2">
626 626
         <div class="widget-user-header bg-yellow">
Please login to merge, or discard this patch.
public/old/statistics.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -139,12 +139,12 @@
 block discarded – undo
139 139
     		<tbody>
140 140
     		<?php
141 141
                 $sql = "SELECT s.date,s.detail1,s.detail2,s.detail3,s.type,trim(concat(u.firstName,' ',u.lastName)) AS name FROM statistics s INNER JOIN users u ON u.id = s.userid";
142
-          if (!isAdmin()) {
143
-              $sql .= 'WHERE u.ID=s.userID';
144
-              if (!$debug) {
145
-                  $sql .= " AND s.type = 'system'";
146
-              }
147
-          }
142
+            if (!isAdmin()) {
143
+                $sql .= 'WHERE u.ID=s.userID';
144
+                if (!$debug) {
145
+                    $sql .= " AND s.type = 'system'";
146
+                }
147
+            }
148 148
                 $sql .= ' ORDER BY date desc '.$limit;
149 149
                 $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
150 150
                 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
Please login to merge, or discard this patch.
public/old/swap.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $swapId = filter_var($swapId, FILTER_SANITIZE_NUMBER_INT);
48 48
 
49 49
 switch ($action) {
50
-  case 'swap':
50
+    case 'swap':
51 51
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
52 52
         $eventPersonId = $_POST['eventPerson'];
53 53
         $newUserRoleId = $_POST['newUserRole'];
@@ -61,48 +61,48 @@  discard block
 block discarded – undo
61 61
         $err = 'Swap details incorrect, please try again.';
62 62
     }
63 63
     break;
64
-  case 'accept':
64
+    case 'accept':
65 65
     if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
66 66
         switch (acceptSwap($swapId)) {
67 67
         case '1':
68 68
           $message = 'Swap Successful';
69
-          break;
69
+            break;
70 70
         case '2':
71 71
           $message = 'Swap already accepted.';
72
-          break;
72
+            break;
73 73
         case '3':
74 74
           $message = 'Swap already declined.';
75
-          break;
75
+            break;
76 76
         case '4':
77 77
           $message = 'Swap already reverted.';
78
-          break;
78
+            break;
79 79
         default:
80 80
           $err = 'Technical issue - please inform system administrator';
81
-          break;
82
-      }
81
+            break;
82
+        }
83 83
     } else {
84 84
         $err = 'Swap Already Actioned or Verification Code Invalid';
85 85
     }
86 86
     break;
87
-  case 'decline':
87
+    case 'decline':
88 88
     if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
89 89
         switch (declineSwap($swapId)) {
90 90
         case '1':
91 91
           $message = 'Swap declined';
92
-          break;
92
+            break;
93 93
         case '2':
94 94
           $message = 'Swap already declined.';
95
-          break;
95
+            break;
96 96
         default:
97 97
           $err = 'Technical issue - please inform system administrator';
98
-          break;
98
+            break;
99 99
         }
100 100
     } else {
101 101
         $err = 'Swap Already Actioned or Verification Code Invalid';
102 102
     }
103 103
     break;
104 104
 
105
-  default:
105
+    default:
106 106
     // code...
107 107
     break;
108 108
 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		<section class="content">
164 164
       
165 165
       <?php
166
-      if (isset($message)): ?>
166
+        if (isset($message)): ?>
167 167
       
168 168
         <p><?php echo $message ?></p>
169 169
 
@@ -224,19 +224,19 @@  discard block
 block discarded – undo
224 224
                 <label for="newUserRole">Swap To:</label>
225 225
                 <select name="newUserRole" class="form-control">
226 226
                   <?php
227
-                  if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
-                      $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
-                  } else {
230
-                      $whereAnd = 'r.id = '.$role->roleId;
231
-                  }
232
-                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
-                  $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
-
235
-                  while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
-                      ?>
227
+                    if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
+                        $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
+                    } else {
230
+                        $whereAnd = 'r.id = '.$role->roleId;
231
+                    }
232
+                    $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
+                    $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
+
235
+                    while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
+                        ?>
237 237
                     <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'].' '.$row['lastName'].' ('.$row['name'].')'; ?></option>
238 238
                   <?php
239
-                  } ?>
239
+                    } ?>
240 240
                 </select>
241 241
               </div>
242 242
             </div>
Please login to merge, or discard this patch.