Completed
Push — master ( b03ed7...47fcc2 )
by Christopher
07:30 queued 01:06
created
public/old/includes/functions.event.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     $sql = ("INSERT INTO cr_eventPeople (eventId, userRoleId) VALUES ('$eventId', '$userRoleId')");
15 15
 
16 16
     if (!mysqli_query(db(), $sql)) {
17
-        die('Error: '.mysqli_error(db()));
17
+        die('Error: ' . mysqli_error(db()));
18 18
     }
19 19
 }
20 20
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 {
30 30
     $sql = "DELETE FROM cr_eventPeople WHERE eventId = '$id' AND userRoleId = '$userRoleId'";
31 31
     if (!mysqli_query(db(), $sql)) {
32
-        die('Error: '.mysqli_error(db()));
32
+        die('Error: ' . mysqli_error(db()));
33 33
     }
34 34
 }
35 35
 
@@ -170,40 +170,40 @@  discard block
 block discarded – undo
170 170
 
171 171
     $ob = mysqli_fetch_object($result);
172 172
 
173
-    $subject = 'Swap requested: '.$ob->newUserName.' - '.$ob->eventDate;
174
-    $message = "Date:\t\t ".strftime($ob->time_format_long, strtotime($ob->eventDate))."\r\n".
175
-                "Requested by:\t\t ".$ob->requestedBy."\r\n".
176
-                "Swap from:\t\t ".$ob->oldUserName.' - '.$ob->oldRole."\r\n".
177
-                "Swap to:\t\t ".$ob->newUserName.' - '.$ob->newRole."\r\n".
178
-                "Accept:\t\t ".$ob->siteurl.'/swap.php?action='.'accept&swap='.$swapId.'&verify='.$verificationCode."\r\n "."\r\n".
179
-                "Decline:\t\t ".$ob->siteurl.'/swap.php?action='.'decline&swap='.$swapId.'&verify='.$verificationCode."\r\n "."\r\n";
173
+    $subject = 'Swap requested: ' . $ob->newUserName . ' - ' . $ob->eventDate;
174
+    $message = "Date:\t\t " . strftime($ob->time_format_long, strtotime($ob->eventDate)) . "\r\n" .
175
+                "Requested by:\t\t " . $ob->requestedBy . "\r\n" .
176
+                "Swap from:\t\t " . $ob->oldUserName . ' - ' . $ob->oldRole . "\r\n" .
177
+                "Swap to:\t\t " . $ob->newUserName . ' - ' . $ob->newRole . "\r\n" .
178
+                "Accept:\t\t " . $ob->siteurl . '/swap.php?action=' . 'accept&swap=' . $swapId . '&verify=' . $verificationCode . "\r\n " . "\r\n" .
179
+                "Decline:\t\t " . $ob->siteurl . '/swap.php?action=' . 'decline&swap=' . $swapId . '&verify=' . $verificationCode . "\r\n " . "\r\n";
180 180
 
181 181
     $from = $ob->siteadmin;
182 182
 
183
-    $linkToSwap = 'swap.php?swap='.$swapId;
183
+    $linkToSwap = 'swap.php?swap=' . $swapId;
184 184
 
185 185
     $sessionUserId = $_SESSION['userid'];
186 186
 
187 187
     if ($sessionUserId == $ob->oldUserId) {    // if old user requests swap
188 188
         // notify new user
189
-        $notificationMessage = $ob->oldUserFirstName.' requested a swap';
189
+        $notificationMessage = $ob->oldUserFirstName . ' requested a swap';
190 190
         $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
191
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
191
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
192 192
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
193 193
     } elseif ($sessionUserId == $ob->newUserId) {    // if new user requests swap
194 194
         // notify old user
195
-        $notificationMessage = $ob->newUserFirstName.' requested a swap';
195
+        $notificationMessage = $ob->newUserFirstName . ' requested a swap';
196 196
         $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
197
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationId, $notificationMessage);
197
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
198 198
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
199 199
     } else { // notify both users
200 200
         $sessionUserFirstName = getFirstNameWithId($sessionUserId);
201
-        $notificationMessageOldUser = $sessionUserFirstName.' requested a swap for '.$ob->newUserFirstName;
202
-        $notificationMessageNewUser = $sessionUserFirstName.' requested a swap for '.$ob->oldUserFirstName;
201
+        $notificationMessageOldUser = $sessionUserFirstName . ' requested a swap for ' . $ob->newUserFirstName;
202
+        $notificationMessageNewUser = $sessionUserFirstName . ' requested a swap for ' . $ob->oldUserFirstName;
203 203
         $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
204 204
         $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
205
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessageOldUser);
206
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessageNewUser);
205
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessageOldUser);
206
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessageNewUser);
207 207
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
208 208
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
209 209
     }
@@ -233,60 +233,60 @@  discard block
 block discarded – undo
233 233
 
234 234
     $ob = mysqli_fetch_object($result);
235 235
 
236
-    $subject = 'Swap accepted: '.$ob->newUserName.' - '.$ob->eventDate;
237
-    $message = "The following swap has been accepted\r\n\r\n".
238
-                "Date:\t\t ".strftime($ob->time_format_long, strtotime($ob->eventDate))."\r\n".
239
-                "Requested by:\t\t ".$ob->requestedBy."\r\n".
240
-                "Swap from:\t\t ".$ob->oldUserName.' - '.$ob->oldRole."\r\n".
241
-                "Swap to:\t\t ".$ob->newUserName.' - '.$ob->newRole."\r\n";
236
+    $subject = 'Swap accepted: ' . $ob->newUserName . ' - ' . $ob->eventDate;
237
+    $message = "The following swap has been accepted\r\n\r\n" .
238
+                "Date:\t\t " . strftime($ob->time_format_long, strtotime($ob->eventDate)) . "\r\n" .
239
+                "Requested by:\t\t " . $ob->requestedBy . "\r\n" .
240
+                "Swap from:\t\t " . $ob->oldUserName . ' - ' . $ob->oldRole . "\r\n" .
241
+                "Swap to:\t\t " . $ob->newUserName . ' - ' . $ob->newRole . "\r\n";
242 242
     $from = $ob->siteadmin;
243 243
 
244
-    $linkToSwap = 'swap.php?swap='.$swapId;
244
+    $linkToSwap = 'swap.php?swap=' . $swapId;
245 245
 
246 246
     $sessionUserId = $_SESSION['userid'];
247 247
 
248 248
     if ($sessionUserId == $ob->oldUserId) {    // if old user accepted swap
249 249
         // notify new user
250
-        $notificationMessage = $ob->oldUserFirstName.' accepted a swap';
250
+        $notificationMessage = $ob->oldUserFirstName . ' accepted a swap';
251 251
         $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
252
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
252
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
253 253
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
254 254
     } elseif ($sessionUserId == $ob->newUserId) {    // if new user accepted swap
255 255
         // notify old user
256
-        $notificationMessage = $ob->newUserFirstName.' accepted a swap';
256
+        $notificationMessage = $ob->newUserFirstName . ' accepted a swap';
257 257
         $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
258
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationId, $notificationMessage);
258
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
259 259
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
260 260
     } elseif (isset($_GET['token'])) { // if accepted by email URL with token
261 261
         // notify whoever requested swap
262 262
         if ($ob->newUserId == $ob->requestedBy) {
263
-            $notificationMessage = 'Swap accepted with '.$ob->oldUserFirstName;
263
+            $notificationMessage = 'Swap accepted with ' . $ob->oldUserFirstName;
264 264
             $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
265
-            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
265
+            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
266 266
             sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
267 267
         } elseif ($ob->oldUserId == $ob->requestedBy) {
268
-            $notificationMessage = 'Swap accepted with '.$ob->newUserFirstName;
268
+            $notificationMessage = 'Swap accepted with ' . $ob->newUserFirstName;
269 269
             $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
270
-            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationId, $notificationMessage);
270
+            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
271 271
             sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
272 272
         } else { // notify both
273
-            $notificationMessageOldUser = 'Swap accepted with '.$ob->newUserFirstName;
274
-            $notificationMessageNewUser = 'Swap accepted with '.$ob->oldUserFirstName;
273
+            $notificationMessageOldUser = 'Swap accepted with ' . $ob->newUserFirstName;
274
+            $notificationMessageNewUser = 'Swap accepted with ' . $ob->oldUserFirstName;
275 275
             $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
276 276
             $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
277
-            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessage);
278
-            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessage);
277
+            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessage);
278
+            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessage);
279 279
             sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
280 280
             sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
281 281
         }
282 282
     } else { // notify both users
283 283
         $sessionUserFirstName = getFirstNameWithId($sessionUserId);
284
-        $notificationMessageOldUser = $sessionUserFirstName.' accepted a swap for '.$ob->newUserFirstName;
285
-        $notificationMessageNewUser = $sessionUserFirstName.' accepted a swap for '.$ob->oldUserFirstName;
284
+        $notificationMessageOldUser = $sessionUserFirstName . ' accepted a swap for ' . $ob->newUserFirstName;
285
+        $notificationMessageNewUser = $sessionUserFirstName . ' accepted a swap for ' . $ob->oldUserFirstName;
286 286
         $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
287 287
         $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
288
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessage);
289
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessage);
288
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessage);
289
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessage);
290 290
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
291 291
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
292 292
     }
@@ -315,39 +315,39 @@  discard block
 block discarded – undo
315 315
 
316 316
     $ob = mysqli_fetch_object($result);
317 317
 
318
-    $subject = 'Swap declined: '.$ob->newUserName.' - '.$ob->eventDate;
319
-    $message = "The following swap has been declined\r\n\r\n".
320
-                "Date:\t\t ".strftime($ob->time_format_long, strtotime($ob->eventDate))."\r\n".
321
-                "Requested by:\t\t ".$ob->requestedBy."\r\n".
322
-                "Swap from:\t\t ".$ob->oldUserName.' - '.$ob->oldRole."\r\n".
323
-                "Swap to:\t\t ".$ob->newUserName.' - '.$ob->newRole."\r\n";
318
+    $subject = 'Swap declined: ' . $ob->newUserName . ' - ' . $ob->eventDate;
319
+    $message = "The following swap has been declined\r\n\r\n" .
320
+                "Date:\t\t " . strftime($ob->time_format_long, strtotime($ob->eventDate)) . "\r\n" .
321
+                "Requested by:\t\t " . $ob->requestedBy . "\r\n" .
322
+                "Swap from:\t\t " . $ob->oldUserName . ' - ' . $ob->oldRole . "\r\n" .
323
+                "Swap to:\t\t " . $ob->newUserName . ' - ' . $ob->newRole . "\r\n";
324 324
 
325 325
     $from = $ob->siteadmin;
326 326
 
327
-    $linkToSwap = 'swap.php?swap='.$swapId;
327
+    $linkToSwap = 'swap.php?swap=' . $swapId;
328 328
 
329 329
     $sessionUserId = $_SESSION['userid'];
330 330
 
331 331
     if ($sessionUserId == $ob->oldUserId) {    // if old user declines swap
332 332
         // notify new user
333
-        $notificationMessage = $ob->oldUserFirstName.' declined a swap';
333
+        $notificationMessage = $ob->oldUserFirstName . ' declined a swap';
334 334
         $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
335
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
335
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
336 336
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
337 337
     } elseif ($sessionUserId == $ob->newUserId) {    // if new user declines swap
338 338
         // notify old user
339
-        $notificationMessage = $ob->newUserFirstName.' declined a swap';
339
+        $notificationMessage = $ob->newUserFirstName . ' declined a swap';
340 340
         $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
341
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
341
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
342 342
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
343 343
     } else { // notify both users
344 344
         $sessionUserFirstName = getFirstNameWithId($sessionUserId);
345
-        $notificationMessageOldUser = $sessionUserFirstName.' declined a swap for '.$ob->newUserFirstName;
346
-        $notificationMessageNewUser = $sessionUserFirstName.' declined a swap for '.$ob->oldUserFirstName;
345
+        $notificationMessageOldUser = $sessionUserFirstName . ' declined a swap for ' . $ob->newUserFirstName;
346
+        $notificationMessageNewUser = $sessionUserFirstName . ' declined a swap for ' . $ob->oldUserFirstName;
347 347
         $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
348 348
         $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
349
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessage);
350
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessage);
349
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessage);
350
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessage);
351 351
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
352 352
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
353 353
     }
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 
497 497
     $sql = "UPDATE cr_eventGroups SET archived = true WHERE id = '$seriesId'";
498 498
     if (!mysqli_query(db(), $sql)) {
499
-        die('Error: '.mysqli_error(db()));
499
+        die('Error: ' . mysqli_error(db()));
500 500
     }
501 501
 }
502 502
 
@@ -505,13 +505,13 @@  discard block
 block discarded – undo
505 505
     $sql = "INSERT INTO cr_bandMembers (bandId, userRoleId) VALUES ('$bandId', '$userRoleId')";
506 506
 
507 507
     if (!mysqli_query(db(), $sql)) {
508
-        die('Error: '.mysqli_error(db()));
508
+        die('Error: ' . mysqli_error(db()));
509 509
     }
510 510
 }
511 511
 
512 512
 function getEventUrl($eventId)
513 513
 {
514
-    return 'event.php?id='.$eventId;
514
+    return 'event.php?id=' . $eventId;
515 515
 }
516 516
 
517 517
 function getEventDetails($eventID, $separator, $type = 4, $apprev_description = true, $prefix = '')
@@ -551,9 +551,9 @@  discard block
 block discarded – undo
551 551
 						e.id = $eventID ";
552 552
 
553 553
     if ($type == 1) {
554
-        $sql = $sql."AND ((g.id in (10,11)) OR (g.id=2 and u.firstname='Team')) ";
554
+        $sql = $sql . "AND ((g.id in (10,11)) OR (g.id=2 and u.firstname='Team')) ";
555 555
     }
556
-    $sql = $sql.'ORDER BY e.id, g.id desc, role, firstname, lastname ';
556
+    $sql = $sql . 'ORDER BY e.id, g.id desc, role, firstname, lastname ';
557 557
 
558 558
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
559 559
 
@@ -571,32 +571,32 @@  discard block
 block discarded – undo
571 571
 
572 572
         $firstname = $row['firstname'];
573 573
         if ($firstname != 'Team') {
574
-            $firstname = ltrim(substr($firstname, 0, 1).'.', '.');
574
+            $firstname = ltrim(substr($firstname, 0, 1) . '.', '.');
575 575
         }
576 576
 
577 577
         $lastname = $row['lastname'];
578 578
 
579
-        $returnValue = $returnValue.$separator;
579
+        $returnValue = $returnValue . $separator;
580 580
         switch ($type) {
581 581
             case 0:
582 582
                 //all persons of event
583 583
                 //break;    ->  no special handling, fallthrough to case 1
584 584
             case 1:
585 585
                 //only persons with groupID in 10,11,2  ->  handled in sql query
586
-                $returnValue = $returnValue.$prefix.ltrim($group.': ');
587
-                $returnValue = $returnValue.trim($firstname.' '.$lastname);
586
+                $returnValue = $returnValue . $prefix . ltrim($group . ': ');
587
+                $returnValue = $returnValue . trim($firstname . ' ' . $lastname);
588 588
                 break;
589 589
             case 2:
590 590
                 //only event date and event type
591
-                $returnValue = $returnValue.strftime($time_format_normal, strtotime($eventDate));
592
-                $returnValue = $returnValue.$separator;
593
-                $returnValue = $returnValue.$eventType;
591
+                $returnValue = $returnValue . strftime($time_format_normal, strtotime($eventDate));
592
+                $returnValue = $returnValue . $separator;
593
+                $returnValue = $returnValue . $eventType;
594 594
 
595 595
                 return trim(substr($returnValue, strlen($separator) - 1)); //ends while loop
596 596
                 break;
597 597
             case 4:
598 598
                 //only event type
599
-                $returnValue = $returnValue.$eventType;
599
+                $returnValue = $returnValue . $eventType;
600 600
 
601 601
                 return trim(substr($returnValue, strlen($separator) - 1)); //ends while loop
602 602
                 break;
Please login to merge, or discard this patch.
public/old/includes/functions.notifications.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     7 => 'swap-pending',
16 16
     8 => 'swap-approved',
17 17
     9 => 'email',
18
-  ];
18
+    ];
19 19
 }
20 20
 
21 21
 function createNotificationForUser($userId, $summary, $body, $typeName, $link = null)
Please login to merge, or discard this patch.
public/old/email.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     case 'everyone':
52 52
       echo '<p>Function not complete, please wait while we finish writing it.</p><p>Apologies for any inconvinence.</p>';
53 53
         break;
54
-  default:
54
+    default:
55 55
     echo '<p>Error: Insufficient parameters.</p>';
56 56
     echo '<p>Please inform the system administrator</p>';
57 57
     break;
Please login to merge, or discard this patch.
public/old/emails.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     exit;
36 36
 }
37 37
 if (!isAdmin()) {
38
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
38
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
39 39
     exit;
40 40
 }
41 41
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     if ($editskillID != '') {
72 72
         $sql = ("INSERT INTO cr_eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')");
73 73
         if (!mysqli_query(db(), $sql)) {
74
-            die('Error: '.mysqli_error(db()));
74
+            die('Error: ' . mysqli_error(db()));
75 75
         }
76 76
 
77 77
         // After we have inserted the data, we want to head back to the main page
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
             $sql = ("INSERT INTO cr_eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')");
90 90
             if (!mysqli_query(db(), $sql)) {
91
-                die('Error: '.mysqli_error(db()));
91
+                die('Error: ' . mysqli_error(db()));
92 92
             }
93 93
         }
94 94
 
Please login to merge, or discard this patch.
public/old/linkSocialAuth.php 4 patches
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -37,22 +37,22 @@
 block discarded – undo
37 37
     $platform = strtolower($_POST['platform']);
38 38
 
39 39
     switch ($_POST['action']) {
40
-    case 'link':
41
-      switch ($platform) {
40
+        case 'link':
41
+          switch ($platform) {
42 42
         case 'facebook':
43 43
           $_SESSION['fb-callback-url'] = 'fb-link.php';
44 44
           header('Location: fb-login.php');
45 45
           exit;
46
-      }
47
-      break;
48
-    case 'unlink':
49
-      removeSocialAuthFromUserWithId($id, $platform);
50
-      createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
51
-      break;
52
-
53
-    default:
54
-      // code...
46
+          }
55 47
       break;
48
+        case 'unlink':
49
+          removeSocialAuthFromUserWithId($id, $platform);
50
+          createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
51
+          break;
52
+
53
+        default:
54
+          // code...
55
+          break;
56 56
   }
57 57
 }
58 58
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
       break;
48 48
     case 'unlink':
49 49
       removeSocialAuthFromUserWithId($id, $platform);
50
-      createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
50
+      createNotificationForUser($id, ucfirst($platform) . ' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
51 51
       break;
52 52
 
53 53
     default:
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,14 +106,17 @@
 block discarded – undo
106 106
       <input type="hidden" name="action" value="unlink" />
107 107
       <button class="btn btn-danger">Unlink</button>
108 108
     </form>
109
-    <?php else: ?>
109
+    <?php else {
110
+    : ?>
110 111
     <form action="#" method="post">
111 112
       <input type="hidden" name="id" value="<?php echo $id ?>" />
112 113
       <input type="hidden" name="platform" value="<?php echo $platform ?>" />
113 114
       <input type="hidden" name="action" value="link" />
114 115
       <button class="btn btn-primary">Link</button>
115 116
     </form>
116
-    <?php endif; ?>
117
+    <?php endif;
118
+}
119
+?>
117 120
   </div>
118 121
 </div>
119 122
 <?php endforeach; ?>
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,19 +41,19 @@
 block discarded – undo
41 41
       switch ($platform) {
42 42
         case 'facebook':
43 43
           $_SESSION['fb-callback-url'] = 'fb-link.php';
44
-          header('Location: fb-login.php');
45
-          exit;
46
-      }
47
-      break;
44
+            header('Location: fb-login.php');
45
+            exit;
46
+        }
47
+        break;
48 48
     case 'unlink':
49 49
       removeSocialAuthFromUserWithId($id, $platform);
50
-      createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
51
-      break;
50
+        createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
51
+        break;
52 52
 
53 53
     default:
54 54
       // code...
55 55
       break;
56
-  }
56
+    }
57 57
 }
58 58
 
59 59
 // list of possible social account links (names used as platform names in database)
Please login to merge, or discard this patch.
public/old/index.php 3 patches
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -323,8 +323,10 @@  discard block
 block discarded – undo
323 323
                         echo '</li>';
324 324
                     }
325 325
                     echo '</ul>';
326
-                  else:
326
+                  else {
327
+                      :
327 328
                     echo '<p>No roles assigned to this event.';
329
+                  }
328 330
                   endif;
329 331
                 ?>
330 332
                 </div>
@@ -353,7 +355,8 @@  discard block
 block discarded – undo
353 355
         <a href="events.php?view=all" class="btn btn-primary">view all events</a>
354 356
       </div>
355 357
 
356
-      <?php else: ?>
358
+      <?php else {
359
+    : ?>
357 360
       <p>There are no events this week. <a href="events.php?view=all">View all events</a></p>
358 361
       <?php endif ?>
359 362
 
@@ -374,6 +377,7 @@  discard block
 block discarded – undo
374 377
 
375 378
         <?php // Month separators
376 379
         $newMonth = strftime('%B %Y', strtotime($event->date));
380
+}
377 381
         if ($month != $newMonth):
378 382
         $month = $newMonth;
379 383
         ?>
@@ -500,8 +504,10 @@  discard block
 block discarded – undo
500 504
                         echo '</li>';
501 505
                     }
502 506
                     echo '</ul>';
503
-                  else:
507
+                  else {
508
+                      :
504 509
                     echo '<p>No roles assigned to this event.';
510
+                  }
505 511
                   endif;
506 512
                 ?>
507 513
                 </div>
@@ -527,7 +533,8 @@  discard block
 block discarded – undo
527 533
         <?php endforeach ?>
528 534
       </ul>
529 535
 
530
-      <?php else: ?>
536
+      <?php else {
537
+    : ?>
531 538
       <p>You have no events on the upcoming rota. <a href="events.php">View all events</a></p>
532 539
       <?php endif ?>
533 540
 
@@ -649,6 +656,7 @@  discard block
 block discarded – undo
649 656
               <a href="addUser.php?action=edit">
650 657
                 <?php
651 658
                 $userHasEmail = (strlen($user->getEmail()) > 3);
659
+}
652 660
                 $emailRemindersEnabled = ($userHasEmail && true); // todo: add opt-out for email reminders
653 661
                 ?>
654 662
                 Email Reminders <span class="pull-right badge bg-<?php echo $emailRemindersEnabled ? 'green' : 'red' ?>"><?php echo $emailRemindersEnabled ? siteSettings()->getDaysToAlert().' days before' : ($userHasEmail ? 'Disabled' : 'No email address') ?></span>
Please login to merge, or discard this 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.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             </div><!-- /.timeline-header -->
222 222
 
223 223
             <div class="timeline-body">
224
-              <p><strong><?php echo $event->getEventGroup() ? $event->getEventGroup()->getName().': ' : '' ?></strong><?php echo $event->getSermonTitle() ?> <?php echo $event->getBibleVerse() ? '('.$event->getBibleVerse().')' : '' ?></p>
224
+              <p><strong><?php echo $event->getEventGroup() ? $event->getEventGroup()->getName() . ': ' : '' ?></strong><?php echo $event->getSermonTitle() ?> <?php echo $event->getBibleVerse() ? '(' . $event->getBibleVerse() . ')' : '' ?></p>
225 225
               <p><strong>Location:</strong> <?php echo $event->getLocation()->getName(); ?></p>
226 226
 
227 227
               <?php if ($event->getComments()): ?>
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
                                   INNER JOIN cr_groups g ON g.id = r.groupId
282 282
                                   INNER JOIN cr_users u ON u.id = ur.userId
283 283
                                   INNER JOIN cr_eventPeople ep ON ep.userRoleId = ur.id
284
-                                WHERE ep.eventId = '".$event->getId()."'
284
+                                WHERE ep.eventId = '".$event->getId() . "'
285 285
                                   AND ep.removed = 0
286 286
                                 ORDER BY g.name, r.name";
287 287
 
@@ -306,16 +306,16 @@  discard block
 block discarded – undo
306 306
                             } else {
307 307
                                 echo '</ul>';
308 308
                             }
309
-                            echo '<p><strong>'.$groupName.'</strong></p>';
309
+                            echo '<p><strong>' . $groupName . '</strong></p>';
310 310
                             echo '<ul>';
311 311
                         }
312 312
 
313 313
                         echo '<li>';
314
-                        echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : '';
314
+                        echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : '';
315 315
                         echo $viewPeople->name;
316 316
 
317 317
                         if ($viewPeople->rolename != '') {
318
-                            echo ' - <em>'.$viewPeople->rolename.'</em>';
318
+                            echo ' - <em>' . $viewPeople->rolename . '</em>';
319 319
                         } else {
320 320
                             // If there is no skill, we don't need to mention this.
321 321
                         }
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             </div><!-- /.timeline-header -->
398 398
 
399 399
             <div class="timeline-body">
400
-              <p><strong><?php echo $event->eventGroup ? $event->eventGroup.': ' : '' ?></strong><?php echo $event->sermonTitle ?> <?php echo $event->bibleVerse ? '('.$event->bibleVerse.')' : '' ?></p>
400
+              <p><strong><?php echo $event->eventGroup ? $event->eventGroup . ': ' : '' ?></strong><?php echo $event->sermonTitle ?> <?php echo $event->bibleVerse ? '(' . $event->bibleVerse . ')' : '' ?></p>
401 401
               <p><strong>Location:</strong> <?php echo $event->eventLocation; ?></p>
402 402
 
403 403
               <?php if ($event->comment != ''): ?>
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
                                   INNER JOIN cr_groups g ON g.id = r.groupId
459 459
                                   INNER JOIN cr_users u ON u.id = ur.userId
460 460
                                   INNER JOIN cr_eventPeople ep ON ep.userRoleId = ur.id
461
-                                WHERE ep.eventId = '".$event->id."'
461
+                                WHERE ep.eventId = '".$event->id . "'
462 462
                                   AND ep.removed = 0
463 463
                                 ORDER BY g.name, r.name";
464 464
 
@@ -483,16 +483,16 @@  discard block
 block discarded – undo
483 483
                             } else {
484 484
                                 echo '</ul>';
485 485
                             }
486
-                            echo '<p><strong>'.$groupName.'</strong></p>';
486
+                            echo '<p><strong>' . $groupName . '</strong></p>';
487 487
                             echo '<ul>';
488 488
                         }
489 489
 
490 490
                         echo '<li>';
491
-                        echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : '';
491
+                        echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : '';
492 492
                         echo $viewPeople->name;
493 493
 
494 494
                         if ($viewPeople->rolename != '') {
495
-                            echo ' - <em>'.$viewPeople->rolename.'</em>';
495
+                            echo ' - <em>' . $viewPeople->rolename . '</em>';
496 496
                         } else {
497 497
                             // If there is no skill, we don't need to mention this.
498 498
                         }
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
                   ">
564 564
                   <?php echo timeInWordsWithTense($event->getDate()) ?>
565 565
                 </span>
566
-                <?php else: ?>
566
+                <?php else : ?>
567 567
                 <span class="pull-right badge bg-red">
568 568
                   never
569 569
                 </span>
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
             <img class="img-circle" src="<?php echo getProfileImageUrl($_SESSION['userid'], 'large') ?>" alt="User Avatar">
629 629
           </div>
630 630
           <!-- /.widget-user-image -->
631
-          <h3 class="widget-user-username"><?php echo $user->getFirstName().' '.$user->getLastName() ?></h3>
631
+          <h3 class="widget-user-username"><?php echo $user->getFirstName() . ' ' . $user->getLastName() ?></h3>
632 632
           <h5 class="widget-user-desc">Account created <?php echo $user->getCreated('M. Y') ?></h5>
633 633
         </div>
634 634
         <div class="box-footer no-padding">
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
                 $userHasEmail = (strlen($user->getEmail()) > 3);
653 653
                 $emailRemindersEnabled = ($userHasEmail && true); // todo: add opt-out for email reminders
654 654
                 ?>
655
-                Email Reminders <span class="pull-right badge bg-<?php echo $emailRemindersEnabled ? 'green' : 'red' ?>"><?php echo $emailRemindersEnabled ? siteSettings()->getDaysToAlert().' days before' : ($userHasEmail ? 'Disabled' : 'No email address') ?></span>
655
+                Email Reminders <span class="pull-right badge bg-<?php echo $emailRemindersEnabled ? 'green' : 'red' ?>"><?php echo $emailRemindersEnabled ? siteSettings()->getDaysToAlert() . ' days before' : ($userHasEmail ? 'Disabled' : 'No email address') ?></span>
656 656
               </a>
657 657
             </li>
658 658
             <li>
Please login to merge, or discard this patch.
public/old/logout.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@
 block discarded – undo
5 5
 include 'includes/config.php';
6 6
 include 'includes/functions.php';
7 7
 
8
- // you have to open the session first
9
- session_start();
8
+    // you have to open the session first
9
+    session_start();
10 10
 
11 11
     //if ($debug) notifyInfo(__FILE__,"logout",$_SESSION['userid']);	//only_for_testing//
12 12
     if ($debug) {
13 13
         insertStatistics('user', __FILE__, 'logout');
14 14
     }
15 15
 
16
- //remove all the variables in the session
17
- session_unset();
16
+    //remove all the variables in the session
17
+    session_unset();
18 18
 
19
- // destroy the session
20
- session_destroy();
19
+    // destroy the session
20
+    session_destroy();
21 21
 
22
- header('Location: login.php');
22
+    header('Location: login.php');
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,31 +6,31 @@
 block discarded – undo
6 6
     // To help the built-in PHP dev server, check if the request was actually for
7 7
     // something which should probably be served as a static file
8 8
     $url = parse_url($_SERVER['REQUEST_URI']);
9
-    $file = __DIR__.$url['path'];
9
+    $file = __DIR__ . $url['path'];
10 10
     if (is_file($file)) {
11 11
         return false;
12 12
     }
13 13
 }
14 14
 
15
-require __DIR__.'/../vendor/autoload.php';
15
+require __DIR__ . '/../vendor/autoload.php';
16 16
 
17 17
 // setup Propel (autoload configured though composer)
18
-require_once __DIR__.'/../generated-conf/config.php';
18
+require_once __DIR__ . '/../generated-conf/config.php';
19 19
 
20 20
 session_start();
21 21
 
22 22
 // Instantiate the app
23
-$settings = require __DIR__.'/../src/settings.php';
23
+$settings = require __DIR__ . '/../src/settings.php';
24 24
 $app = new \Slim\App($settings);
25 25
 
26 26
 // Set up dependencies
27
-require __DIR__.'/../src/dependencies.php';
27
+require __DIR__ . '/../src/dependencies.php';
28 28
 
29 29
 // Register middleware
30
-require __DIR__.'/../src/middleware.php';
30
+require __DIR__ . '/../src/middleware.php';
31 31
 
32 32
 // Register routes
33
-require __DIR__.'/../src/routes.php';
33
+require __DIR__ . '/../src/routes.php';
34 34
 
35 35
 // Run app
36 36
 $app->run();
Please login to merge, or discard this patch.
generated-migrations/PropelMigration_1494860053.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function getUpSQL()
41 41
     {
42 42
         return [
43
-  'default' => '
43
+    'default' => '
44 44
 # This is a fix for InnoDB in MySQL >= 4.1.x
45 45
 # It "suspends judgement" for fkey relationships until are tables are set.
46 46
 SET FOREIGN_KEY_CHECKS = 0;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     public function getDownSQL()
173 173
     {
174 174
         return [
175
-  'default' => '
175
+    'default' => '
176 176
 # This is a fix for InnoDB in MySQL >= 4.1.x
177 177
 # It "suspends judgement" for fkey relationships until are tables are set.
178 178
 SET FOREIGN_KEY_CHECKS = 0;
Please login to merge, or discard this patch.