Completed
Pull Request — master (#6)
by Christopher
07:12
created
public/old/calendar.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 // fetch events
52 52
 
53 53
 switch ($_GET['format']) {
54
-  case 'ical':
54
+    case 'ical':
55 55
     icalOutput($events);
56 56
     break;
57 57
 }
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
     $value = trim($value);
126 126
     $value = strip_tags($value);
127 127
     $value = preg_replace('/\n+/', ' ', $value); // remove newlines
128
-  $value = preg_replace('/\s{2,}/', ' ', $value); // remove whitespace
129
-  $value = str_replace(',', '\,', $value); // escape commas
130
-  $preamble_len = strlen($preamble);
128
+    $value = preg_replace('/\s{2,}/', ' ', $value); // remove whitespace
129
+    $value = str_replace(',', '\,', $value); // escape commas
130
+    $preamble_len = strlen($preamble);
131 131
     $lines = [];
132 132
     while (strlen($value) > (75 - $preamble_len)) {
133 133
         $space = (75 - $preamble_len);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 METHOD:PUBLISH
69 69
 VERSION:2.0
70 70
 PRODID:-//Church Rota//Church Rota//EN
71
-X-WR-CALNAME:'.siteSettings()->getOwner()." Rota
71
+X-WR-CALNAME:'.siteSettings()->getOwner() . " Rota
72 72
 CALSCALE:GREGORIAN
73 73
 BEGIN:VTIMEZONE
74 74
 TZID:Europe/London
@@ -94,16 +94,16 @@  discard block
 block discarded – undo
94 94
     foreach ($events as $event):
95 95
     $output .=
96 96
 'BEGIN:VEVENT
97
-SUMMARY:'.$event->role.($event->name ? ' | '.$event->name.' ('.$event->type.')' : ' ('.$event->type.')').'
98
-DESCRIPTION:'.ical_split('DESCRIPTION:', $event->series.':\n'.$event->sermonTitle.' ('.$event->bibleVerse.')\n\nIf you are unable to do '.$event->role.' at this event, please request a swap:\n'.siteSettings()->getSiteUrl().'/swap.php?event='.$event->id.'\n\nOnce the swap is accepted, this event will be removed from your calendar.\nPlease be aware that changes may take up to 24 hours or longer to be reflected. This is due to your calendar, not on the rota system.').'
99
-UID:ROTA'.$event->id.'
100
-ORGANIZER;CN="'.siteSettings()->getOwner().'":MAILTO:'.siteSettings()->getAdminEmailAddress().'
101
-STATUS:'.'CONFIRMED'.'
102
-DTSTART;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date)).'
103
-DTEND;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date) + HOUR).'
104
-LAST-MODIFIED:'.date(DATE_ICAL, strtotime($event->updated)).'Z
105
-LOCATION:'.ical_split('LOCATION:', $event->locationName.', '.$event->locationAddress).'
106
-URL:'.siteSettings()->getSiteUrl().'/event.php?id='.$event->id."
97
+SUMMARY:'.$event->role . ($event->name ? ' | ' . $event->name . ' (' . $event->type . ')' : ' (' . $event->type . ')') . '
98
+DESCRIPTION:'.ical_split('DESCRIPTION:', $event->series . ':\n' . $event->sermonTitle . ' (' . $event->bibleVerse . ')\n\nIf you are unable to do ' . $event->role . ' at this event, please request a swap:\n' . siteSettings()->getSiteUrl() . '/swap.php?event=' . $event->id . '\n\nOnce the swap is accepted, this event will be removed from your calendar.\nPlease be aware that changes may take up to 24 hours or longer to be reflected. This is due to your calendar, not on the rota system.') . '
99
+UID:ROTA'.$event->id . '
100
+ORGANIZER;CN="'.siteSettings()->getOwner() . '":MAILTO:' . siteSettings()->getAdminEmailAddress() . '
101
+STATUS:'.'CONFIRMED' . '
102
+DTSTART;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date)) . '
103
+DTEND;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date) + HOUR) . '
104
+LAST-MODIFIED:'.date(DATE_ICAL, strtotime($event->updated)) . 'Z
105
+LOCATION:'.ical_split('LOCATION:', $event->locationName . ', ' . $event->locationAddress) . '
106
+URL:'.siteSettings()->getSiteUrl() . '/event.php?id=' . $event->id . "
107 107
 BEGIN:VALARM
108 108
 ACTION:DISPLAY
109 109
 DESCRIPTION:Reminder for Rota
Please login to merge, or discard this patch.
public/old/update.settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     exit;
34 34
 }
35 35
 if (!isAdmin()) {
36
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
36
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
37 37
     exit;
38 38
 }
39 39
 
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
 if ($action == 'update') {
58 58
     //if ($language='de-de')
59 59
     if ($rowSettings['lang_locale'] == 'en_GB') {
60
-        executeDbSql("update cr_settings set lang_locale = 'de_DE'");                     // de_DE
60
+        executeDbSql("update cr_settings set lang_locale = 'de_DE'"); // de_DE
61 61
             executeDbSql("update cr_settings set time_format_long = '%A, %e. %B %Y, %R Uhr, KW%V'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V
62 62
             executeDbSql("update cr_settings set time_format_normal = '%d.%m.%Y %H:%M '"); // de_DE: %d.%m.%Y %H:%M
63
-            executeDbSql("update cr_settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
63
+            executeDbSql("update cr_settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
64 64
             executeDbSql("update cr_settings set time_zone = 'Europe/Berlin'"); //de_DE: Europe/Berlin
65 65
             executeDbSql("update cr_settings set google_group_calendar = ''");
66 66
         executeDbSql("update cr_settings set overviewemail = '{{Gottesdienst-Planung [MONTH] [YEAR]}}\r\nHallo zusammen,\r\n\r\nanbei die Gottesdienst-Planung fuer [MONTH] [YEAR]\r\n\r\n[OVERVIEW]\r\n\r\nBitte fruehzeitig Bescheid geben, wenn etwas NICHT passt, ansonsten gehe ich davon aus, dass ihr wie geplant koennt.\r\n\r\nAlles Gute und Gottes Segen f�r Euch und Euren Dienst.\r\nEuer Gottesdienst Orga-Team'");
67 67
     }
68 68
     //else
69 69
     if ($rowSettings['lang_locale'] == 'de_DE') {
70
-        executeDbSql("update cr_settings set lang_locale = 'en_GB'");                     // de_DE
70
+        executeDbSql("update cr_settings set lang_locale = 'en_GB'"); // de_DE
71 71
             executeDbSql("update cr_settings set time_format_long = '%A, %B %e @ %I:%M %p'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V
72 72
             executeDbSql("update cr_settings set time_format_normal = '%m/%d/%y %I:%M %p'"); // de_DE: %d.%m.%Y %H:%M
73
-            executeDbSql("update cr_settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
73
+            executeDbSql("update cr_settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
74 74
             executeDbSql("update cr_settings set time_zone = 'Europe/London'"); //de_DE: Europe/Berlin
75 75
             executeDbSql("update cr_settings set google_group_calendar = ''");
76 76
         executeDbSql("update cr_settings set overviewemail = 'Hello,\r\n\r\nIn this email you find the Rota for [MONTH] [YEAR].\r\n\r\n[OVERVIEW]\r\n\r\nPlease inform us as soon as possible, if you are not able to serve as scheduled.\r\n\r\nBe blessed.\r\nChurch Support Stuff'");
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     $resultSettings = mysqli_query(db(), $sqlSettings) or die(mysqli_error(db()));
83 83
     $rowSettings = mysqli_fetch_array($resultSettings, MYSQLI_ASSOC);
84 84
 
85
-    $updateNotification = 'Settings updated successfully to: '.$rowSettings['lang_locale'].' <br>&nbsp;<br>';
85
+    $updateNotification = 'Settings updated successfully to: ' . $rowSettings['lang_locale'] . ' <br>&nbsp;<br>';
86 86
 }
87 87
 
88 88
 $formatting = 'true';
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 	<hr>
95 95
 	This page has only beta status. <br>Please do only use it in testing environments!
96 96
 	<hr>
97
-	<?php echo 'Your web browser identifies your language as: '.$language; ?><br>
98
-	<?php echo 'Church Rota is set to use: '.$rowSettings['lang_locale']; ?><br>&nbsp;<br>
97
+	<?php echo 'Your web browser identifies your language as: ' . $language; ?><br>
98
+	<?php echo 'Church Rota is set to use: ' . $rowSettings['lang_locale']; ?><br>&nbsp;<br>
99 99
 	
100 100
 <?php
101 101
 if ($updateNotification == '') {
Please login to merge, or discard this patch.
public/old/fb-link.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     ini_set('log_errors', true);
9 9
     error_reporting(E_ALL);
10 10
 
11
-  date_default_timezone_set('Europe/London');
11
+    date_default_timezone_set('Europe/London');
12 12
 
13 13
 // Include files, including the database connection
14 14
 include 'includes/config.php';
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 } require_once 'vendor/autoload.php';
25 25
 
26 26
 $fb = new Facebook\Facebook([
27
-  'app_id'                => $config['auth']['facebook']['appId'],
28
-  'app_secret'            => $config['auth']['facebook']['appSecret'],
29
-  'default_graph_version' => 'v2.2',
30
-  ]);
27
+    'app_id'                => $config['auth']['facebook']['appId'],
28
+    'app_secret'            => $config['auth']['facebook']['appSecret'],
29
+    'default_graph_version' => 'v2.2',
30
+    ]);
31 31
 
32 32
 $accessToken = $_SESSION['fb_access_token'];
33 33
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Facebook;
6 6
 
7
-ini_set('display_errors', false);    // set on for development, off for production
7
+ini_set('display_errors', false); // set on for development, off for production
8 8
     ini_set('log_errors', true);
9 9
     error_reporting(E_ALL);
10 10
 
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
     // Returns a `Facebook\FacebookResponse` object
38 38
     $response = $fb->get('/me?fields=id,name,email', $accessToken);
39 39
 } catch (Facebook\Exceptions\FacebookResponseException $e) {
40
-    echo 'Graph returned an error: '.$e->getMessage();
40
+    echo 'Graph returned an error: ' . $e->getMessage();
41 41
     exit;
42 42
 } catch (Facebook\Exceptions\FacebookSDKException $e) {
43
-    echo 'Facebook SDK returned an error: '.$e->getMessage();
43
+    echo 'Facebook SDK returned an error: ' . $e->getMessage();
44 44
     exit;
45 45
 }
46 46
 
Please login to merge, or discard this patch.
public/old/tableView.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 									 FROM cr_eventTypes et
112 112
 									 WHERE id IN (SELECT e.type
113 113
 										 						FROM cr_events e
114
-																WHERE '.$whereTwoMonth.'
114
+																WHERE '.$whereTwoMonth . '
115 115
 																AND e.removed = 0)
116 116
 									 ORDER BY name';
117 117
         $result = mysqli_query(db(), $filter_sql) or die(mysqli_error(db()));
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 <tr>
133 133
 	<td ><strong>Event</strong></td>
134 134
 	<?php
135
-    $sql = 'SELECT * FROM cr_groups g ORDER BY '.$group_sorting_name;
135
+    $sql = 'SELECT * FROM cr_groups g ORDER BY ' . $group_sorting_name;
136 136
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
137 137
 
138 138
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
     if ($filter == '') {
165 165
         $sql .= '
166
-							AND '.$whereTwoMonth.'
166
+							AND '.$whereTwoMonth . '
167 167
 						ORDER BY
168 168
 							e.date';
169 169
     } elseif ($filter == 'all') {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     } elseif ($filter != '') {
174 174
         $sql .= "
175 175
 							AND e.type = '$filter'
176
-							AND ".$whereTwoMonth.'
176
+							AND " . $whereTwoMonth . '
177 177
 						ORDER BY
178 178
 							e.date';
179 179
     }
@@ -188,34 +188,34 @@  discard block
 block discarded – undo
188 188
         echo '<tr>';
189 189
         echo '<td >';
190 190
         setlocale(LC_TIME, $lang_locale); //de_DE
191
-        echo '<a href="event.php?id='.$row['id'].'">';
191
+        echo '<a href="event.php?id=' . $row['id'] . '">';
192 192
         echo strftime($time_format_short, strtotime($row['sundayDate'])); // %a, <strong>%e. %b</strong>, KW%V
193 193
         echo '</a>';
194 194
 
195 195
         //$row['sundayDate']
196 196
         if (!empty($row['eventType'])) {
197
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventType'].'</em>';
197
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventType'] . '</em>';
198 198
         }
199 199
         if (!empty($row['eventSubType'])) {
200
-            echo ' - <em>'.$row['eventSubType'].'</em>';
200
+            echo ' - <em>' . $row['eventSubType'] . '</em>';
201 201
         }
202 202
         if (!empty($row['eventLocation'])) {
203
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventLocation'].'</em>';
203
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventLocation'] . '</em>';
204 204
         }
205 205
         if (!empty($row['name'])) {
206
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['name'].'</em>';
206
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['name'] . '</em>';
207 207
         }
208 208
         if (!empty($row['eventGroup'])) {
209
-            echo '<br /><strong>&nbsp;&nbsp;&nbsp;'.$row['eventGroup'].'</strong>';
209
+            echo '<br /><strong>&nbsp;&nbsp;&nbsp;' . $row['eventGroup'] . '</strong>';
210 210
         }
211 211
         if (!empty($row['sermonTitle'])) {
212
-            echo ': '.$row['sermonTitle'];
212
+            echo ': ' . $row['sermonTitle'];
213 213
         }
214 214
         if (!empty($row['bibleVerse'])) {
215
-            echo ' <em>('.$row['bibleVerse'].')</em>';
215
+            echo ' <em>(' . $row['bibleVerse'] . ')</em>';
216 216
         }
217 217
         if (!empty($row['comment'])) {
218
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;('.$row['comment'].')</em>';
218
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;(' . $row['comment'] . ')</em>';
219 219
         }
220 220
         echo '</td>';
221 221
 
@@ -247,16 +247,16 @@  discard block
 block discarded – undo
247 247
                     if ($previousName == '') {
248 248
                         // new name
249 249
                         echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
250
-                        echo $name.' <em>('.$viewPeople['role'];
250
+                        echo $name . ' <em>(' . $viewPeople['role'];
251 251
                     } elseif ($previousName != $name) {
252 252
                         echo ')</em>';
253 253
                         echo ($viewPeople['userId'] != $sessionUserId) ? '</strong>' : '';
254 254
                         echo '<br />'; // line break from previous name
255 255
                         // new name
256 256
                         echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
257
-                        echo $name.' <em>('.$viewPeople['role'];
257
+                        echo $name . ' <em>(' . $viewPeople['role'];
258 258
                     } else {
259
-                        echo ', '.$viewPeople['role'];
259
+                        echo ', ' . $viewPeople['role'];
260 260
                     }
261 261
 
262 262
                     $peopleInEvent = true;
Please login to merge, or discard this patch.
public/old/includes/functions.password.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
 
43 43
     $ret = '';
44 44
 
45
-    $chars = 26 * 2 + 10;   //26 (a-z) + 26 (A-Z) + 10 (0-9)
45
+    $chars = 26 * 2 + 10; //26 (a-z) + 26 (A-Z) + 10 (0-9)
46 46
     //a-z = 97-122
47 47
     //A-Z = 65-90
48 48
     //0-9 = 48-57
49 49
 
50
-    srand(make_seed());     //Seed with microseconds
50
+    srand(make_seed()); //Seed with microseconds
51 51
     //if you don't need this, you can just use srand(time());
52 52
 
53 53
     for ($i = 1; $i <= $length; $i++) {
Please login to merge, or discard this patch.
public/old/includes/functions.facebook.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
 function facebook()
17 17
 {
18 18
     $fb = new Facebook\Facebook([
19
-      'app_id'                => siteConfig()['auth']['facebook']['appId'],
20
-      'app_secret'            => siteConfig()['auth']['facebook']['appSecret'],
21
-      'default_graph_version' => 'v2.2',
22
-      ]);
19
+        'app_id'                => siteConfig()['auth']['facebook']['appId'],
20
+        'app_secret'            => siteConfig()['auth']['facebook']['appSecret'],
21
+        'default_graph_version' => 'v2.2',
22
+        ]);
23 23
 
24 24
     return $fb;
25 25
 }
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
     $tokenMetadata = $oAuth2Client->debugToken($accessToken);
67 67
 
68 68
     // Validation (these will throw FacebookSDKException's when they fail)
69
-  $tokenMetadata->validateAppId($config['auth']['facebook']['appId']); // Replace {app-id} with your app id
70
-  // If you know the user ID this access token belongs to, you can validate it here
71
-  //$tokenMetadata->validateUserId('123');
72
-  $tokenMetadata->validateExpiration();
69
+    $tokenMetadata->validateAppId($config['auth']['facebook']['appId']); // Replace {app-id} with your app id
70
+    // If you know the user ID this access token belongs to, you can validate it here
71
+    //$tokenMetadata->validateUserId('123');
72
+    $tokenMetadata->validateExpiration();
73 73
 
74 74
     if (!$accessToken->isLongLived()) {
75 75
         // Exchanges a short-lived access token for a long-lived one
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
         echo var_dump($accessToken);
39 39
     } catch (Facebook\Exceptions\FacebookResponseException $e) {
40 40
         // When Graph returns an error
41
-        echo 'Graph returned an error: '.$e->getMessage();
41
+        echo 'Graph returned an error: ' . $e->getMessage();
42 42
         exit;
43 43
     } catch (Facebook\Exceptions\FacebookSDKException $e) {
44 44
         // When validation fails or other local issues
45
-        echo 'Facebook SDK returned an error: '.$e->getMessage();
45
+        echo 'Facebook SDK returned an error: ' . $e->getMessage();
46 46
         exit;
47 47
     }
48 48
 
49 49
     if (!isset($accessToken)) {
50 50
         if ($helper->getError()) {
51 51
             header('HTTP/1.0 401 Unauthorized');
52
-            echo 'Error: '.$helper->getError()."\n";
53
-            echo 'Error Code: '.$helper->getErrorCode()."\n";
54
-            echo 'Error Reason: '.$helper->getErrorReason()."\n";
55
-            echo 'Error Description: '.$helper->getErrorDescription()."\n";
52
+            echo 'Error: ' . $helper->getError() . "\n";
53
+            echo 'Error Code: ' . $helper->getErrorCode() . "\n";
54
+            echo 'Error Reason: ' . $helper->getErrorReason() . "\n";
55
+            echo 'Error Description: ' . $helper->getErrorDescription() . "\n";
56 56
         } else {
57 57
             header('HTTP/1.0 400 Bad Request');
58 58
             echo 'Bad request';
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         try {
77 77
             $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
78 78
         } catch (Facebook\Exceptions\FacebookSDKException $e) {
79
-            echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n";
79
+            echo '<p>Error getting long-lived access token: ' . $helper->getMessage() . "</p>\n\n";
80 80
             exit;
81 81
         }
82 82
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         return false;
122 122
     }
123
-    $sendNotif = $fb->post('/'.$facebookUserId.'/notifications', ['href' => $url, 'template' => $message], $appAccessToken);
123
+    $sendNotif = $fb->post('/' . $facebookUserId . '/notifications', ['href' => $url, 'template' => $message], $appAccessToken);
124 124
 
125 125
     if ($sendNotif->getHttpStatusCode() == 200) {
126 126
         return true;
Please login to merge, or discard this patch.
public/old/emailEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $statusMessage = 'Sent successfully';
54 54
     } else {
55 55
         foreach ($sent as $errorMessage) {
56
-            $statusMessage .= '<p>'.$errorMessage.'</p>';
56
+            $statusMessage .= '<p>' . $errorMessage . '</p>';
57 57
         }
58 58
     }
59 59
 
Please login to merge, or discard this patch.
public/old/fb-signup.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
 }
28 28
 
29 29
 $fb = new Facebook\Facebook([
30
-  'app_id'                => $config['auth']['facebook']['appId'],
31
-  'app_secret'            => $config['auth']['facebook']['appSecret'],
32
-  'default_graph_version' => 'v2.2',
33
-  ]);
30
+    'app_id'                => $config['auth']['facebook']['appId'],
31
+    'app_secret'            => $config['auth']['facebook']['appSecret'],
32
+    'default_graph_version' => 'v2.2',
33
+    ]);
34 34
 
35 35
 $accessToken = $_SESSION['fb_access_token'];
36 36
 $_SESSION['foo'] = 'bar';
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
     // Returns a `Facebook\FacebookResponse` object
42 42
     $response = $fb->get('/me?fields=id,name,email', $accessToken);
43 43
 } catch (Facebook\Exceptions\FacebookResponseException $e) {
44
-    echo 'Graph returned an error: '.$e->getMessage();
44
+    echo 'Graph returned an error: ' . $e->getMessage();
45 45
     exit;
46 46
 } catch (Facebook\Exceptions\FacebookSDKException $e) {
47
-    echo 'Facebook SDK returned an error: '.$e->getMessage();
47
+    echo 'Facebook SDK returned an error: ' . $e->getMessage();
48 48
     exit;
49 49
 }
50 50
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             <label class="fa fa-envelope-o" for="email"><span class="hidden">Email address</span></label>
92 92
             <input name="email" id="email" type="text" class="form__input" placeholder="Email address" value="<?php echo $user->getEmail(); ?>" required>
93 93
           </div>
94
-					<?php if (!empty($message)): echo '<p>'.$message.'</p>'; endif; ?>
94
+					<?php if (!empty($message)): echo '<p>' . $message . '</p>'; endif; ?>
95 95
           <div class="form__field">
96 96
             <input type="submit" value="Request access">
97 97
           </div>
Please login to merge, or discard this patch.
public/old/roles.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 if ($role && $assignTo) {
35 35
     $sql = "UPDATE cr_roles r SET r.groupId = '$assignTo' WHERE r.id = '$role'";
36 36
     if (!mysqli_query(db(), $sql)) {
37
-        die('Error: '.mysqli_error(db()));
37
+        die('Error: ' . mysqli_error(db()));
38 38
     }
39 39
     header('Location: roles.php');
40 40
     exit;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $sql = "INSERT INTO cr_roles (name, description, rehersalId, groupId)
71 71
             VALUES ('$newrole', '$newrole', $rehersal, $groupId)";
72 72
         if (!mysqli_query(db(), $sql)) {
73
-            die('Error: '.mysqli_error(db()));
73
+            die('Error: ' . mysqli_error(db()));
74 74
         }
75 75
     } elseif ($method == 'newgroup') {
76 76
         $groupId = $_POST['groups'];
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $sql = "INSERT INTO cr_groups (name, description)
87 87
             VALUES ('$newgroup', '$newgroup')";
88 88
         if (!mysqli_query(db(), $sql)) {
89
-            die('Error: '.mysqli_error(db()));
89
+            die('Error: ' . mysqli_error(db()));
90 90
         }
91 91
     } else {
92 92
         // Handle renaming of the roles
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
     $i = 1;
120 120
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
121 121
         if ($type == 'option') {
122
-            $list = $list."<option value='".$row['id']."'>".$row['name'].'</option>';
122
+            $list = $list . "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
123 123
         } elseif ($type == 'li') {
124
-            $list = $list.'<li>'.$row['name'].'</li>';
124
+            $list = $list . '<li>' . $row['name'] . '</li>';
125 125
         } elseif ($type == 'li-a') {
126
-            $list = $list."<li><a href='roles.php?role=".$roleId.'&assignto='.$row['id']."'>".$row['name'].'</a></li>';
126
+            $list = $list . "<li><a href='roles.php?role=" . $roleId . '&assignto=' . $row['id'] . "'>" . $row['name'] . '</a></li>';
127 127
         }
128 128
         $i++;
129 129
     }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             $group = $row['groupId'];
190 190
             $down = $group + 1;
191 191
             $up = $group - 1;
192
-            echo '<div><strong>'.$groupname.'</strong><br />';
192
+            echo '<div><strong>' . $groupname . '</strong><br />';
193 193
         }
194 194
         // Print text input box if a role exists for the group.
195 195
         // Allows user to update role names and move roles between groups
Please login to merge, or discard this patch.