Completed
Push — master ( 9c28d3...3dae15 )
by Christopher
06:31
created
public/old/includes/functions.mail.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -266,8 +266,10 @@  discard block
 block discarded – undo
266 266
     if (is_array($rotaoutput)):
267 267
         foreach ($rotaoutput as $key => $skill):
268 268
             $skillfinal = $skillfinal.$skill.' ';
269
-    endforeach; else:
269
+    endforeach; else {
270
+        :
270 271
         $skillfinal = $rotaoutput;
272
+    }
271 273
     endif;
272 274
     $message = str_replace('[rotaoutput]', $skillfinal, $message);
273 275
     $message = str_replace('[siteurl]', $siteurl, $message);
@@ -445,8 +447,10 @@  discard block
 block discarded – undo
445 447
             $roles = [];
446 448
             while ($roleRow = mysqli_fetch_array($roleResult, MYSQLI_ASSOC)) {
447 449
                 if (($roleRow['name'] == '') || ($roleRow['name'] == $roleRow['description'])):
448
-                    $roles[] = $roleRow['description']; else:
450
+                    $roles[] = $roleRow['description']; else {
451
+                        :
449 452
                     $roles[] = $roleRow['description'].' - '.$roleRow['name'];
453
+                    }
450 454
                 endif;
451 455
             }
452 456
 
Please login to merge, or discard this patch.
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
 {
28 28
     $dbMailId = mailToDb($to, $subject, $message, $from, $bcc);
29 29
 
30
-    $subject = '[rota] '.$subject;
30
+    $subject = '[rota] ' . $subject;
31 31
 
32 32
     $message .= "\n\n";
33
-    $message .= siteSettings()->getOwner()."\n";
34
-    $message .= 'Mail generated with ChurchRota V.'.siteSettings()->getVersion()."\n";
35
-    $message .= siteSettings()->getSiteUrl()."\n";
33
+    $message .= siteSettings()->getOwner() . "\n";
34
+    $message .= 'Mail generated with ChurchRota V.' . siteSettings()->getVersion() . "\n";
35
+    $message .= siteSettings()->getSiteUrl() . "\n";
36 36
 
37 37
     $mailSentOk = false;
38 38
 
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
     //rfc sais \r\n, but this makes trouble in outlook. several spaces plus \n works fine in outlook and thunderbird.
77 77
     //spaces to suppress automatic removal of "unnecessary linefeeds" in outlook 2003
78 78
     $crlf = "      \n";
79
-    $message = str_replace("\r\n", $crlf, $message);  //replace crlf's
79
+    $message = str_replace("\r\n", $crlf, $message); //replace crlf's
80 80
 
81 81
     //--------------------------------------------------------------------------------
82
-    $headers = 'From: '.$from.$crlf.
83
-    'Reply-To: '.$from.$crlf.
84
-    'Mime-Version: 1.0'.$crlf.
85
-    'Content-Type: text/plain; charset=ISO-8859-1'.$crlf;
86
-    'Content-Transfer-Encoding: quoted-printable'.$crlf;
82
+    $headers = 'From: ' . $from . $crlf .
83
+    'Reply-To: ' . $from . $crlf .
84
+    'Mime-Version: 1.0' . $crlf .
85
+    'Content-Type: text/plain; charset=ISO-8859-1' . $crlf;
86
+    'Content-Transfer-Encoding: quoted-printable' . $crlf;
87 87
     $headerSimple = $headers;
88 88
 
89 89
     //--------------------------------------------------------------------------------
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
     $to = str_replace(';', ',', $to);
93 93
 
94 94
     if ($mail_dbg) {
95
-        $subject = ' - Mail Debug: '.$subject;   //debug output
96
-        $message .= $crlf.'To: '.$to.$crlf;   //debug move to to end of message
95
+        $subject = ' - Mail Debug: ' . $subject; //debug output
96
+        $message .= $crlf . 'To: ' . $to . $crlf; //debug move to to end of message
97 97
     }
98 98
 
99 99
     //--------------------------------------------------------------------------------
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
     foreach ($teile as $adr) {
106 106
         if (preg_replace("/([a-zA-Z0-9._%+-]+)(@)([a-zA-Z0-9.-]+)(\.)([a-zA-Z]+)/i", '# # #', trim($adr)) == '# # #') {
107 107
             if ($mail_dbg) {
108
-                $message .= 'Bcc: '.trim($adr).$crlf;
108
+                $message .= 'Bcc: ' . trim($adr) . $crlf;
109 109
             } else {
110
-                $headers .= 'Bcc: '.trim($adr).$crlf;
110
+                $headers .= 'Bcc: ' . trim($adr) . $crlf;
111 111
             }
112 112
             $i = $i + 1;
113 113
         } else {
114
-            $bcc_err .= $adr.$crlf;
114
+            $bcc_err .= $adr . $crlf;
115 115
             $err .= +1;
116 116
         }
117 117
     }
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
         if ($mailOk) {
145 145
             //mail($from, "[ChurchRota] Mail status - OK", "address ok: " . $i, $headerSimple);
146 146
         } else {
147
-            mail($from, '[Rota] Mail status - ERROR', 'to: '.$to.$crlf.'address ok: '.$i.$crlf.'address errors: '.$err.$crlf.$bcc_err, $headerSimple);
147
+            mail($from, '[Rota] Mail status - ERROR', 'to: ' . $to . $crlf . 'address ok: ' . $i . $crlf . 'address errors: ' . $err . $crlf . $bcc_err, $headerSimple);
148 148
 
149 149
             return false;
150
-            logFailedMailWithId($dbMailId, 'address ok: '.$i.$crlf.'address errors: '.$err.$crlf.$bcc_err, $headerSimple);
150
+            logFailedMailWithId($dbMailId, 'address ok: ' . $i . $crlf . 'address errors: ' . $err . $crlf . $bcc_err, $headerSimple);
151 151
         }
152 152
     }
153 153
 
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
         }
205 205
         $categoryname = $row['categoryname'];
206 206
         $to = $row['email'];
207
-        $subject = 'New post: '.$objectname;
207
+        $subject = 'New post: ' . $objectname;
208 208
 
209
-        $finalmessage = 'Dear '.$postname."\n \n".$message.$objectname."\n \n".
209
+        $finalmessage = 'Dear ' . $postname . "\n \n" . $message . $objectname . "\n \n" .
210 210
         'To see the post, please login using your username and password';
211 211
 
212 212
         sendMail($to, $subject, $finalmessage, $row['siteadmin']);
@@ -226,19 +226,19 @@  discard block
 block discarded – undo
226 226
 
227 227
     $message = siteSettings()->getNewUserMessage();
228 228
 
229
-    $name = $user->firstName.' '.$user->lastName;
229
+    $name = $user->firstName . ' ' . $user->lastName;
230 230
     $message = str_replace('[name]', $name, $message);
231 231
     $message = str_replace('[username]', $user->username, $message);
232 232
     $message = str_replace('[password]', $password, $message);
233 233
     $message = str_replace('[siteurl]', siteSettings()->getSiteUrl(), $message);
234 234
 
235
-    $subject = 'Account created for '.$name;
235
+    $subject = 'Account created for ' . $name;
236 236
 
237
-    $to = $name.' <'.$user->email.'>';
238
-    $from = siteSettings()->getOwner().' <'.siteSettings()->getAdminEmailAddress().'>';
237
+    $to = $name . ' <' . $user->email . '>';
238
+    $from = siteSettings()->getOwner() . ' <' . siteSettings()->getAdminEmailAddress() . '>';
239 239
 
240 240
     sendMail($to, $subject, $message, $from);
241
-    sendMail($from, 'ADMIN COPY: '.$subject, $message, $from);
241
+    sendMail($from, 'ADMIN COPY: ' . $subject, $message, $from);
242 242
 }
243 243
 
244 244
 function parseEmailTemplate($message, $values)
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     $values['siteemail'] = siteSettings()->getAdminEmailAddress();
250 250
 
251 251
     foreach ($values as $template_field => $value) {
252
-        $message = str_ireplace('['.$template_field.']', trim($value), $message);
252
+        $message = str_ireplace('[' . $template_field . ']', trim($value), $message);
253 253
     }
254 254
     $message = trim($message);
255 255
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     $message = str_replace('[rehearsal]', $rehearsal, $message);
266 266
     if (is_array($rotaoutput)):
267 267
         foreach ($rotaoutput as $key => $skill):
268
-            $skillfinal = $skillfinal.$skill.' ';
268
+            $skillfinal = $skillfinal . $skill . ' ';
269 269
     endforeach; else:
270 270
         $skillfinal = $rotaoutput;
271 271
     endif;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 function notifyIndividual($userID, $eventID, $skillID)
284 284
 {
285 285
     notifyEveryoneForEvent($eventID, $skillID, $userID);
286
-    $eventID = 0;  //disables following code through empty sql result
286
+    $eventID = 0; //disables following code through empty sql result
287 287
 
288 288
     $sql = "SELECT *,
289 289
 	(SELECT CONCAT(`firstname`, ' ', `lastname`) FROM users WHERE `users`.id = `skills`.`userID` ORDER BY `users`.firstname) AS `name`,
@@ -324,13 +324,13 @@  discard block
 block discarded – undo
324 324
             if (($row['eventRehearsal'] == '0') or ($row['eventRehearsalChange'] == '1')) {
325 325
                 $rehearsal = $row['norehearsalemail'];
326 326
             } else {
327
-                $rehearsal = $row['yesrehearsal'].' on '.$rehearsaldate.' at '.$location;
327
+                $rehearsal = $row['yesrehearsal'] . ' on ' . $rehearsaldate . ' at ' . $location;
328 328
             }
329 329
         }
330 330
 
331 331
         $skill = $row['category'];
332 332
         if ($row['joinedskill'] != '') {
333
-            $skill = $skill.' - '.$row['joinedskill'];
333
+            $skill = $skill . ' - ' . $row['joinedskill'];
334 334
         } else {
335 335
             // If there is no skill, then we don't need to mention this fact.
336 336
         }
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $location = $row['eventLocationFormatted'];
347 347
         $rotaoutput = $skill;
348 348
         $to = $row['email'];
349
-        $subject = 'Rota reminder: '.$date;
349
+        $subject = 'Rota reminder: ' . $date;
350 350
 
351 351
         $message = emailTemplate($message, $name, $date, $location, $rehearsal, $rotaoutput, $username, $siteurl);
352 352
 
@@ -417,9 +417,9 @@  discard block
 block discarded – undo
417 417
 
418 418
                 $type = $ob->eventType;
419 419
 
420
-                $eventdetails = $eventrow['eventGroup'].': '.$eventrow['sermonTitle'];
420
+                $eventdetails = $eventrow['eventGroup'] . ': ' . $eventrow['sermonTitle'];
421 421
                 if (!empty($eventrow['bibleVerse'])) {
422
-                    $eventdetails .= ' ('.$eventrow['bibleVerse'].')';
422
+                    $eventdetails .= ' (' . $eventrow['bibleVerse'] . ')';
423 423
                 }
424 424
             }
425 425
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
             while ($roleRow = mysqli_fetch_array($roleResult, MYSQLI_ASSOC)) {
443 443
                 if (($roleRow['name'] == '') || ($roleRow['name'] == $roleRow['description'])):
444 444
                     $roles[] = $roleRow['description']; else:
445
-                    $roles[] = $roleRow['description'].' - '.$roleRow['name'];
445
+                    $roles[] = $roleRow['description'] . ' - ' . $roleRow['name'];
446 446
                 endif;
447 447
             }
448 448
 
@@ -462,11 +462,11 @@  discard block
 block discarded – undo
462 462
             $message = siteSettings()->getNotificationEmail();
463 463
             $rotaoutput = implode(', ', $roles);
464 464
 
465
-            $to = $ob->name.' <'.$ob->email.'>';
466
-            $from = siteSettings()->getOwner().' <'.siteSettings()->getAdminEmailAddress().'>';
465
+            $to = $ob->name . ' <' . $ob->email . '>';
466
+            $from = siteSettings()->getOwner() . ' <' . siteSettings()->getAdminEmailAddress() . '>';
467 467
 
468 468
             //$subject = "Rota reminder: " . $date;
469
-            $subject = 'Reminder: '.implode(', ', $roles).' - '.$type.': '.$date;
469
+            $subject = 'Reminder: ' . implode(', ', $roles) . ' - ' . $type . ': ' . $date;
470 470
 
471 471
             $rotadetails = getEventDetails($eventId, "\r\n", 0, false, "\t");
472 472
 
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 							ep.notified = 1
502 502
 						WHERE
503 503
 							ep.eventId = '$eventId'
504
-							AND ur.userId IN (".implode(', ', $countarray).')';
504
+							AND ur.userId IN (" . implode(', ', $countarray) . ')';
505 505
 
506 506
         mysqli_query(db(), $sql) or die(mysqli_error(db()));
507 507
     }
@@ -530,14 +530,14 @@  discard block
 block discarded – undo
530 530
     $user = mysqli_fetch_object($result);
531 531
 
532 532
     if (!$user->email) {
533
-        return 'No email address present for '.$user->firstName.' '.$user->lastName;
533
+        return 'No email address present for ' . $user->firstName . ' ' . $user->lastName;
534 534
     }
535 535
 
536 536
     if (!$user->recieveReminderEmails) {
537
-        return $user->firstName.' '.$user->lastName.' opted not to recieve reminder emails';
537
+        return $user->firstName . ' ' . $user->lastName . ' opted not to recieve reminder emails';
538 538
     }
539 539
 
540
-    $name = $user->firstName.' '.$user->lastName;
540
+    $name = $user->firstName . ' ' . $user->lastName;
541 541
 
542 542
     //line seperator for mails
543 543
     //rfc sais \r\n, but this makes trouble in outlook. several spaces plus \n works fine in outlook and thunderbird.
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
     $eventDetails .= ' - ';
571 571
     $eventDetails .= "\r\n";
572 572
     $eventDetails .= $event->type;
573
-    $eventDetails .= $event->eventGroup.': '.$event->sermonTitle.' ('.$event->bibleVerse.')';
573
+    $eventDetails .= $event->eventGroup . ': ' . $event->sermonTitle . ' (' . $event->bibleVerse . ')';
574 574
     $eventDetails .= "\r\n";
575 575
     $eventDetails .= "\r\n";
576 576
 
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
         'event.type'     => $event->type,
595 595
         'event.location' => $event->location,
596 596
 
597
-        'event.sermon'        => $event->eventGroup.': '.$event->sermonTitle.' ('.$event->bibleVerse.')',
597
+        'event.sermon'        => $event->eventGroup . ': ' . $event->sermonTitle . ' (' . $event->bibleVerse . ')',
598 598
         'event.sermon.name'   => $event->sermonTitle,
599 599
         'event.sermon.series' => $event->eventGroup,
600 600
         'event.sermon.verse'  => $event->bibleVerse,
@@ -608,8 +608,8 @@  discard block
 block discarded – undo
608 608
 
609 609
     //$message = str_replace("\r\n",$crlf,$message);
610 610
 
611
-    $to = $name.' <'.$user->email.'>';
612
-    $from = siteSettings()->getOwner().' <'.$siteSettings()->getAdminEmailAddress().'>';
611
+    $to = $name . ' <' . $user->email . '>';
612
+    $from = siteSettings()->getOwner() . ' <' . $siteSettings()->getAdminEmailAddress() . '>';
613 613
 
614 614
     $sent = false;
615 615
     $sent = sendMail($to, $subject, $message, $from);
@@ -617,10 +617,10 @@  discard block
 block discarded – undo
617 617
     if ($sent == true) {
618 618
         return true;
619 619
     } else {
620
-        return 'Error while sending mail to '.$user->firstName.' '.$user->lastName;
620
+        return 'Error while sending mail to ' . $user->firstName . ' ' . $user->lastName;
621 621
     }
622 622
 
623
-    return 'Unknown error for '.$user->firstName.' '.$user->lastName;
623
+    return 'Unknown error for ' . $user->firstName . ' ' . $user->lastName;
624 624
 }
625 625
 
626 626
 function getEventEmailSubject($eventId)
@@ -667,16 +667,16 @@  discard block
 block discarded – undo
667 667
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
668 668
     $groupNames = '';
669 669
     while ($group = mysqli_fetch_object($result)) {
670
-        $groupNames .= $group->name.', ';
670
+        $groupNames .= $group->name . ', ';
671 671
     }
672 672
 
673 673
     if (isset($errors)) {
674
-        createNotificationForUser($_SESSION['userid'], 'Email sent with warnings', 'Email sent to '.$groupNames.' groups with errors: '.implode(', ', $errors), 'email');
674
+        createNotificationForUser($_SESSION['userid'], 'Email sent with warnings', 'Email sent to ' . $groupNames . ' groups with errors: ' . implode(', ', $errors), 'email');
675 675
 
676 676
         return $errors;
677 677
     }
678 678
 
679
-    createNotificationForUser($_SESSION['userid'], 'Group email sent', 'Email sent successfully to '.$groupNames, 'email');
679
+    createNotificationForUser($_SESSION['userid'], 'Group email sent', 'Email sent successfully to ' . $groupNames, 'email');
680 680
 
681 681
     return $true;
682 682
 }
@@ -728,16 +728,16 @@  discard block
 block discarded – undo
728 728
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
729 729
     $groupNames = '';
730 730
     while ($group = mysqli_fetch_object($result)) {
731
-        $groupNames .= $group->name.', ';
731
+        $groupNames .= $group->name . ', ';
732 732
     }
733 733
 
734 734
     if (isset($errors)) {
735
-        createNotificationForUser($_SESSION['userid'], 'Email sent with warnings', 'Email sent to '.$groupNames." groups with errors: \n- ".implode("\n- ", $errors), 'email');
735
+        createNotificationForUser($_SESSION['userid'], 'Email sent with warnings', 'Email sent to ' . $groupNames . " groups with errors: \n- " . implode("\n- ", $errors), 'email');
736 736
 
737 737
         return $errors;
738 738
     }
739 739
 
740
-    createNotificationForUser($_SESSION['userid'], 'Group email sent', 'Email sent successfully to '.$groupNames, 'email');
740
+    createNotificationForUser($_SESSION['userid'], 'Group email sent', 'Email sent successfully to ' . $groupNames, 'email');
741 741
 
742 742
     return $true;
743 743
 }
@@ -753,14 +753,14 @@  discard block
 block discarded – undo
753 753
     $user = mysqli_fetch_object($result);
754 754
 
755 755
     if (!$user->email) {
756
-        return 'No email address present for '.$user->firstName.' '.$user->lastName;
756
+        return 'No email address present for ' . $user->firstName . ' ' . $user->lastName;
757 757
     }
758 758
 
759 759
     if (!$user->isOverviewRecipient) {
760
-        return $user->firstName.' '.$user->lastName.' opted not to recieve group emails';
760
+        return $user->firstName . ' ' . $user->lastName . ' opted not to recieve group emails';
761 761
     }
762 762
 
763
-    $name = $user->firstName.' '.$user->lastName;
763
+    $name = $user->firstName . ' ' . $user->lastName;
764 764
 
765 765
     //line seperator for mails
766 766
     //rfc sais \r\n, but this makes trouble in outlook. several spaces plus \n works fine in outlook and thunderbird.
@@ -823,8 +823,8 @@  discard block
 block discarded – undo
823 823
 
824 824
     //$message = str_replace("\r\n",$crlf,$message);
825 825
 
826
-    $to = $name.' <'.$user->email.'>';
827
-    $from = siteSettings()->getOwner().' <'.$siteadmin.'>';
826
+    $to = $name . ' <' . $user->email . '>';
827
+    $from = siteSettings()->getOwner() . ' <' . $siteadmin . '>';
828 828
 
829 829
     $sent = false;
830 830
     $sent = sendMail($to, $subject, $message, $from);
@@ -832,10 +832,10 @@  discard block
 block discarded – undo
832 832
     if ($sent == true) {
833 833
         return true;
834 834
     } else {
835
-        return 'Error while sending mail to '.$user->firstName.' '.$user->lastName;
835
+        return 'Error while sending mail to ' . $user->firstName . ' ' . $user->lastName;
836 836
     }
837 837
 
838
-    return 'Unknown error for '.$user->firstName.' '.$user->lastName;
838
+    return 'Unknown error for ' . $user->firstName . ' ' . $user->lastName;
839 839
 }
840 840
 
841 841
 // returns either true, or error message string
@@ -848,14 +848,14 @@  discard block
 block discarded – undo
848 848
     $user = mysqli_fetch_object($result);
849 849
 
850 850
     if (!$user->email) {
851
-        return 'No email address present for '.$user->firstName.' '.$user->lastName;
851
+        return 'No email address present for ' . $user->firstName . ' ' . $user->lastName;
852 852
     }
853 853
 
854 854
     if (!$user->isOverviewRecipient) {
855
-        return $user->firstName.' '.$user->lastName.' opted not to recieve group emails';
855
+        return $user->firstName . ' ' . $user->lastName . ' opted not to recieve group emails';
856 856
     }
857 857
 
858
-    $name = $user->firstName.' '.$user->lastName;
858
+    $name = $user->firstName . ' ' . $user->lastName;
859 859
 
860 860
     //line seperator for mails
861 861
     //rfc sais \r\n, but this makes trouble in outlook. several spaces plus \n works fine in outlook and thunderbird.
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
     }
889 889
 
890 890
     if (!isset($events)) {
891
-        return $name.' has no events in the upcoming rota';
891
+        return $name . ' has no events in the upcoming rota';
892 892
     }
893 893
 
894 894
     $events = implode(', ', $events);
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
 
942 942
         $eventDetails .= $row['joinedskills'];
943 943
         $eventDetails .= "\r\n";
944
-        $eventDetails .= 'Notes: '.$row['comment'];
944
+        $eventDetails .= 'Notes: ' . $row['comment'];
945 945
         $eventDetails .= "\r\n";
946 946
         $eventDetails .= "\r\n";
947 947
     }
@@ -957,8 +957,8 @@  discard block
 block discarded – undo
957 957
 
958 958
     //$message = str_replace("\r\n",$crlf,$message);
959 959
 
960
-    $to = $name.' <'.$user->email.'>';
961
-    $from = siteSettings()->getOwner().' <'.$siteadmin.'>';
960
+    $to = $name . ' <' . $user->email . '>';
961
+    $from = siteSettings()->getOwner() . ' <' . $siteadmin . '>';
962 962
 
963 963
     $sent = false;
964 964
     $sent = sendMail($to, $subject, $message, $from);
@@ -966,10 +966,10 @@  discard block
 block discarded – undo
966 966
     if ($sent == true) {
967 967
         return true;
968 968
     } else {
969
-        return 'Error while sending mail to '.$user->firstName.' '.$user->lastName;
969
+        return 'Error while sending mail to ' . $user->firstName . ' ' . $user->lastName;
970 970
     }
971 971
 
972
-    return 'Unknown error for '.$user->firstName.' '.$user->lastName;
972
+    return 'Unknown error for ' . $user->firstName . ' ' . $user->lastName;
973 973
 }
974 974
 
975 975
 function notifyAttack($fileName, $attackType, $attackerID)
@@ -984,10 +984,10 @@  discard block
 block discarded – undo
984 984
 
985 985
     while ($row = mysqli_fetch_array($userresult, MYSQLI_ASSOC)) {
986 986
         $subject = 'SECURITY-ALERT - Attack blocked successfully';
987
-        $message = "Type:\t\t ".$attackType."<br>\r\n".
988
-                    "Attacker:\t ".$row[name]."<br>\r\n".
989
-                    "Date:\t\t ".date('Y-m-d H:i:s')."<br>\r\n".
990
-                    "Script:\t\t ".$fileName."\r\n "."<br>\r\n";
987
+        $message = "Type:\t\t " . $attackType . "<br>\r\n" .
988
+                    "Attacker:\t " . $row[name] . "<br>\r\n" .
989
+                    "Date:\t\t " . date('Y-m-d H:i:s') . "<br>\r\n" .
990
+                    "Script:\t\t " . $fileName . "\r\n " . "<br>\r\n";
991 991
 
992 992
         //$headers = 'From: ' . $row['siteadmin'] . "\r\n" .
993 993
         //'Reply-To: ' . $row['siteadmin'] . "\r\n";
@@ -997,8 +997,8 @@  discard block
 block discarded – undo
997 997
         //mail($to, $subject, strip_tags($message), $headers);
998 998
         sendMail($to, $subject, strip_tags($message), $to);
999 999
 
1000
-        echo $subject.'<br><br>';
1001
-        echo $message.'<br>';
1000
+        echo $subject . '<br><br>';
1001
+        echo $message . '<br>';
1002 1002
         echo 'An email about this incident was sent to administrator!';
1003 1003
     }
1004 1004
 }
@@ -1013,11 +1013,11 @@  discard block
 block discarded – undo
1013 1013
     $userresult = mysqli_query(db(), $sql) or die(mysqli_error(db()));
1014 1014
 
1015 1015
     while ($row = mysqli_fetch_array($userresult, MYSQLI_ASSOC)) {
1016
-        $subject = 'Info - '.$infoMsg.' - '.$row[name];
1017
-        $message = "Type:\t\t ".$infoMsg."<br>\r\n".
1018
-                    "User:\t\t ".$row[name]."<br>\r\n".
1019
-                    "Date:\t\t ".date('Y-m-d H:i:s')."<br>\r\n".
1020
-                    "Script:\t\t ".$fileName."\r\n "."<br>\r\n";
1016
+        $subject = 'Info - ' . $infoMsg . ' - ' . $row[name];
1017
+        $message = "Type:\t\t " . $infoMsg . "<br>\r\n" .
1018
+                    "User:\t\t " . $row[name] . "<br>\r\n" .
1019
+                    "Date:\t\t " . date('Y-m-d H:i:s') . "<br>\r\n" .
1020
+                    "Script:\t\t " . $fileName . "\r\n " . "<br>\r\n";
1021 1021
 
1022 1022
         //$headers = 'From: ' . $row['siteadmin'] . "\r\n" .
1023 1023
         //'Reply-To: ' . $row['siteadmin'] . "\r\n";
@@ -1034,7 +1034,7 @@  discard block
 block discarded – undo
1034 1034
     if (preg_match("/(\{\{)((.)+){1}(\}\})/", $message, $matches) == 1) {
1035 1035
         $defaultSubject = $matches[2];
1036 1036
         //$subject = str_replace(array("{{","}}"),"",$matches[0]);
1037
-        $message = str_replace($matches[1].$matches[2].$matches[4], '', $message);
1037
+        $message = str_replace($matches[1] . $matches[2] . $matches[4], '', $message);
1038 1038
         //$message = $matches[4];
1039 1039
 
1040 1040
         //$message = $message . "\r\n\r\n";
Please login to merge, or discard this patch.
public/old/includes/functions.discussion.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         '#(http://(www.)?youtube.com)?/(v/|watch\?v\=)([-|~_0-9A-Za-z]+)&?.*?#i',
47 47
         '<iframe title="YouTube Video" width="560" height="340" src="http://www.youtube.com/embed/$4" frameborder="0" allowfullscreen></iframe>',
48 48
     $string
49
-  );
49
+    );
50 50
 
51 51
     return $string;
52 52
 }
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/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 groups g ON g.id = r.groupId
282 282
                                   INNER JOIN users u ON u.id = ur.userId
283 283
                                   INNER JOIN 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 groups g ON g.id = r.groupId
459 459
                                   INNER JOIN users u ON u.id = ur.userId
460 460
                                   INNER JOIN 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.