Completed
Push — master ( 5d8acc...ee8b95 )
by Christopher
36s queued 15s
created
public/old/includes/config.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace TechWilk\Rota;
4 4
 
5
-include __DIR__.'/../../../config/database.php';
6
-include __DIR__.'/../../../config/auth.php';
7
-include __DIR__.'/../../../config/email.php';
8
-include __DIR__.'/../../../config/recording.php';
5
+include __DIR__ . '/../../../config/database.php';
6
+include __DIR__ . '/../../../config/auth.php';
7
+include __DIR__ . '/../../../config/email.php';
8
+include __DIR__ . '/../../../config/recording.php';
9 9
 
10 10
 // -- Setup database --
11 11
 
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 }
18 18
 
19 19
 // Connect to the database server
20
-$dbh = @mysqli_connect($config['db']['host'], $config['db']['user'], $config['db']['pass']) or exit('Connection to '.$config['db']['host']." with login '".$config['db']['user']."'/'$pwdMasked' failed.");
20
+$dbh = @mysqli_connect($config['db']['host'], $config['db']['user'], $config['db']['pass']) or exit('Connection to ' . $config['db']['host'] . " with login '" . $config['db']['user'] . "'/'$pwdMasked' failed.");
21 21
 
22 22
 // Choose the right database
23
-$db = @mysqli_select_db($dbh, $config['db']['dbname']) or exit("Connection made, but database '".$config['db']['dbname']."' was not found.");
23
+$db = @mysqli_select_db($dbh, $config['db']['dbname']) or exit("Connection made, but database '" . $config['db']['dbname'] . "' was not found.");
24 24
 
25 25
 // allow config to be fetched in functions
26 26
 
Please login to merge, or discard this patch.
public/api/v1/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
     // Start of API
24 24
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 25
 
26
-    require_once __DIR__.'/../../../vendor/autoload.php';
26
+    require_once __DIR__ . '/../../../vendor/autoload.php';
27 27
 
28
-    require_once __DIR__.'/../../../generated-conf/config.php';
28
+    require_once __DIR__ . '/../../../generated-conf/config.php';
29 29
 
30 30
     // Create and configure Slim app
31 31
     $app = new \Slim\App(['settings' => $config]);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     $container = $app->getContainer();
38 38
 
39
-    $container['db'] = function ($c) {
39
+    $container['db'] = function($c) {
40 40
         $db_config = $c['settings']['db'];
41 41
         $db = new Database($db_config);
42 42
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     // ~~~~~~~~~~~~~~~ Series ~~~~~~~~~~~~~~~
51 51
 
52
-    $app->post('/series', function ($request, $response, $args) {
52
+    $app->post('/series', function($request, $response, $args) {
53 53
         $postData = $request->getParsedBody();
54 54
 
55 55
         $name = filter_var($postData['name'], FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
generated-conf/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__.'/../config/database.php';
3
+require __DIR__ . '/../config/database.php';
4 4
 $serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
5 5
 $serviceContainer->checkVersion('2.0.0-dev');
6 6
 
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
9 9
 $manager->setConfiguration([
10 10
     'classname'  => 'Propel\\Runtime\\Connection\\ConnectionWrapper',
11
-    'dsn'        => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'],
11
+    'dsn'        => 'mysql:host=' . $config['db']['host'] . ';dbname=' . $config['db']['dbname'],
12 12
     'user'       => $config['db']['user'],
13 13
     'password'   => $config['db']['pass'],
14 14
     'attributes' => [
Please login to merge, or discard this patch.
public/old/includes/header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 							<!-- Menu toggle button -->
297 297
 							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
298 298
 								<i class="fa fa-bell-o"></i>
299
-								<?php echo $unseen >= 1 ? '<span class="label label-warning">'.$unseen.'</span>' : '' ?>
299
+								<?php echo $unseen >= 1 ? '<span class="label label-warning">' . $unseen . '</span>' : '' ?>
300 300
 							</a>
301 301
 							<ul class="dropdown-menu">
302 302
 								<li class="header">You have <?php echo $unseen >= 1 ? $unseen : 'no' ?> new notifications</li>
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 									<?php foreach ($notifications as $n): ?>
307 307
 										<li><!-- start notification -->
308 308
 											<a href="notification.php?click=notifications-panel&id=<?php echo $n->id ?>">
309
-												<i class="fa fa-users text-aqua"></i> <?php echo $n->seen ? $n->summary : '<strong>'.$n->summary.'</strong>' ?>
309
+												<i class="fa fa-users text-aqua"></i> <?php echo $n->seen ? $n->summary : '<strong>' . $n->summary . '</strong>' ?>
310 310
 												<small><?php echo timeAgoInWords($n->timestamp) ?></small>
311 311
 											</a>
312 312
 										</li><!-- end notification -->
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 						<!-- User Account Menu -->
362 362
 						<li class="dropdown user user-menu">
363 363
 							<?php
364
-                            $sql = 'SELECT u.created FROM users u WHERE id = '.$_SESSION['userid'];
364
+                            $sql = 'SELECT u.created FROM users u WHERE id = ' . $_SESSION['userid'];
365 365
                             $stmt = mysqli_prepare(db(), $sql);
366 366
                             mysqli_stmt_bind_param($stmt, 'i', $_SESSION['userid']);
367 367
                             mysqli_stmt_execute($stmt) or die(mysqli_error(db()));
Please login to merge, or discard this patch.
public/old/locations.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,10 +142,10 @@
 block discarded – undo
142 142
 	</form>
143 143
 </div><!-- /.box -->
144 144
   <?php
145
-  if (isAdmin()) {
146
-      ?>
145
+    if (isAdmin()) {
146
+        ?>
147 147
   <div id="right">
148 148
   		<div class="item"><a href="settings.php">Back to settings</a></div>
149 149
 <?php
150
-  } ?>
150
+    } ?>
151 151
 <?php include 'includes/footer.php'; ?>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     exit;
17 17
 }
18 18
 if (!isAdmin()) {
19
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
19
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
20 20
     exit;
21 21
 }
22 22
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 
98 98
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
99 99
         $locationID = $row['id'];
100
-        echo "<span id='".$locationID."' class='edit'>".$row['name'].'</span> ';
101
-        echo " <a href='locations.php?locationremove=true&locationID=".$locationID."'><i class='fa fa-close'></i></a><br />";
100
+        echo "<span id='" . $locationID . "' class='edit'>" . $row['name'] . '</span> ';
101
+        echo " <a href='locations.php?locationremove=true&locationID=" . $locationID . "'><i class='fa fa-close'></i></a><br />";
102 102
     } ?>
103 103
  </div><!-- /.box-body -->
104 104
 </div><!-- /.box -->
Please login to merge, or discard this patch.
generated-classes/TechWilk/Rota/User.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function getName()
116 116
     {
117
-        return $this->firstname.' '.$this->lastname;
117
+        return $this->firstname . ' ' . $this->lastname;
118 118
     }
119 119
 
120 120
     /**
@@ -133,16 +133,16 @@  discard block
 block discarded – undo
133 133
                 if ($socialAuth->getPlatform() == 'facebook') {
134 134
                     switch ($size) {
135 135
                         case 'small': // 50px x 50px
136
-                            return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=square';
136
+                            return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=square';
137 137
                             break;
138 138
                         case 'medium': // 200px x 200px
139
-                            return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large';
139
+                            return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=large';
140 140
                             break;
141 141
                         case 'large': // 200px x 200px
142
-                            return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large';
142
+                            return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=large';
143 143
                             break;
144 144
                         default:
145
-                            return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture';
145
+                            return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture';
146 146
                             break;
147 147
                     }
148 148
                 } elseif ($socialAuth->getPlatform() == 'onebody') {
@@ -155,16 +155,16 @@  discard block
 block discarded – undo
155 155
                     $extension = pathinfo($socialAuth->getMeta()['photo-file-name'], PATHINFO_EXTENSION);
156 156
                     switch ($size) {
157 157
                         case 'small': // 50px x 50px
158
-                            return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension;
158
+                            return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/tn/' . $photoFingerprint . '.' . $extension;
159 159
                             break;
160 160
                         case 'medium': // 150px x 150px
161
-                            return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/small/'.$photoFingerprint.'.'.$extension;
161
+                            return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/small/' . $photoFingerprint . '.' . $extension;
162 162
                             break;
163 163
                         case 'large': // 500px x 500px
164
-                            return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/medium/'.$photoFingerprint.'.'.$extension;
164
+                            return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/medium/' . $photoFingerprint . '.' . $extension;
165 165
                             break;
166 166
                         default:
167
-                            return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension;
167
+                            return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/tn/' . $photoFingerprint . '.' . $extension;
168 168
                             break;
169 169
                     }
170 170
                 }
@@ -173,16 +173,16 @@  discard block
 block discarded – undo
173 173
 
174 174
         switch ($size) {
175 175
             case 'small': // 50px x 50px
176
-                return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm';
176
+                return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=50&d=mm';
177 177
                 break;
178 178
             case 'medium': // 200px x 200px
179
-                return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=200&d=mm';
179
+                return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=200&d=mm';
180 180
                 break;
181 181
             case 'large': // 500px x 500px
182
-                return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=500&d=mm';
182
+                return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=500&d=mm';
183 183
                 break;
184 184
             default:
185
-                return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm';
185
+                return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=50&d=mm';
186 186
                 break;
187 187
         }
188 188
     }
Please login to merge, or discard this patch.
public/old/includes/functions.event.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     mysqli_stmt_bind_param($stmt, 'ii', $eventId, $userRoleId);
17 17
 
18 18
     if (!mysqli_stmt_execute($stmt)) {
19
-        exit('Error: '.mysqli_error(db()));
19
+        exit('Error: ' . mysqli_error(db()));
20 20
     }
21 21
     mysqli_stmt_close($stmt);
22 22
 }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     mysqli_stmt_bind_param($stmt, 'ii', $id, $userRoleId);
36 36
 
37 37
     if (!mysqli_stmt_execute($stmt)) {
38
-        exit('Error: '.mysqli_error(db()));
38
+        exit('Error: ' . mysqli_error(db()));
39 39
     }
40 40
     mysqli_stmt_close($stmt);
41 41
 }
@@ -185,40 +185,40 @@  discard block
 block discarded – undo
185 185
 
186 186
     $verificationCode = verificationCodeForSwap($swapId);
187 187
 
188
-    $subject = 'Swap requested: '.$ob->newUserName.' - '.$ob->eventDate;
189
-    $message = "Date:\t\t ".strftime($ob->time_format_long, strtotime($ob->eventDate))."\r\n".
190
-                "Requested by:\t\t ".$ob->requestedBy."\r\n".
191
-                "Swap from:\t\t ".$ob->oldUserName.' - '.$ob->oldRole."\r\n".
192
-                "Swap to:\t\t ".$ob->newUserName.' - '.$ob->newRole."\r\n".
193
-                "Accept:\t\t ".$ob->siteurl.'/swap.php?action='.'accept&swap='.$swapId.'&verify='.$verificationCode."\r\n "."\r\n".
194
-                "Decline:\t\t ".$ob->siteurl.'/swap.php?action='.'decline&swap='.$swapId.'&verify='.$verificationCode."\r\n "."\r\n";
188
+    $subject = 'Swap requested: ' . $ob->newUserName . ' - ' . $ob->eventDate;
189
+    $message = "Date:\t\t " . strftime($ob->time_format_long, strtotime($ob->eventDate)) . "\r\n" .
190
+                "Requested by:\t\t " . $ob->requestedBy . "\r\n" .
191
+                "Swap from:\t\t " . $ob->oldUserName . ' - ' . $ob->oldRole . "\r\n" .
192
+                "Swap to:\t\t " . $ob->newUserName . ' - ' . $ob->newRole . "\r\n" .
193
+                "Accept:\t\t " . $ob->siteurl . '/swap.php?action=' . 'accept&swap=' . $swapId . '&verify=' . $verificationCode . "\r\n " . "\r\n" .
194
+                "Decline:\t\t " . $ob->siteurl . '/swap.php?action=' . 'decline&swap=' . $swapId . '&verify=' . $verificationCode . "\r\n " . "\r\n";
195 195
 
196 196
     $from = $ob->siteadmin;
197 197
 
198
-    $linkToSwap = 'swap.php?swap='.$swapId;
198
+    $linkToSwap = 'swap.php?swap=' . $swapId;
199 199
 
200 200
     $sessionUserId = $_SESSION['userid'];
201 201
 
202 202
     if ($sessionUserId == $ob->oldUserId) {    // if old user requests swap
203 203
         // notify new user
204
-        $notificationMessage = $ob->oldUserFirstName.' requested a swap';
204
+        $notificationMessage = $ob->oldUserFirstName . ' requested a swap';
205 205
         $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
206
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
206
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
207 207
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
208 208
     } elseif ($sessionUserId == $ob->newUserId) {    // if new user requests swap
209 209
         // notify old user
210
-        $notificationMessage = $ob->newUserFirstName.' requested a swap';
210
+        $notificationMessage = $ob->newUserFirstName . ' requested a swap';
211 211
         $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
212
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationId, $notificationMessage);
212
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
213 213
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
214 214
     } else { // notify both users
215 215
         $sessionUserFirstName = getFirstNameWithId($sessionUserId);
216
-        $notificationMessageOldUser = $sessionUserFirstName.' requested a swap for '.$ob->newUserFirstName;
217
-        $notificationMessageNewUser = $sessionUserFirstName.' requested a swap for '.$ob->oldUserFirstName;
216
+        $notificationMessageOldUser = $sessionUserFirstName . ' requested a swap for ' . $ob->newUserFirstName;
217
+        $notificationMessageNewUser = $sessionUserFirstName . ' requested a swap for ' . $ob->oldUserFirstName;
218 218
         $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
219 219
         $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
220
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessageOldUser);
221
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessageNewUser);
220
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessageOldUser);
221
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessageNewUser);
222 222
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
223 223
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
224 224
     }
@@ -251,60 +251,60 @@  discard block
 block discarded – undo
251 251
 
252 252
     $verificationCode = verificationCodeForSwap($swapId);
253 253
 
254
-    $subject = 'Swap accepted: '.$ob->newUserName.' - '.$ob->eventDate;
255
-    $message = "The following swap has been accepted\r\n\r\n".
256
-                "Date:\t\t ".strftime($ob->time_format_long, strtotime($ob->eventDate))."\r\n".
257
-                "Requested by:\t\t ".$ob->requestedBy."\r\n".
258
-                "Swap from:\t\t ".$ob->oldUserName.' - '.$ob->oldRole."\r\n".
259
-                "Swap to:\t\t ".$ob->newUserName.' - '.$ob->newRole."\r\n";
254
+    $subject = 'Swap accepted: ' . $ob->newUserName . ' - ' . $ob->eventDate;
255
+    $message = "The following swap has been accepted\r\n\r\n" .
256
+                "Date:\t\t " . strftime($ob->time_format_long, strtotime($ob->eventDate)) . "\r\n" .
257
+                "Requested by:\t\t " . $ob->requestedBy . "\r\n" .
258
+                "Swap from:\t\t " . $ob->oldUserName . ' - ' . $ob->oldRole . "\r\n" .
259
+                "Swap to:\t\t " . $ob->newUserName . ' - ' . $ob->newRole . "\r\n";
260 260
     $from = $ob->siteadmin;
261 261
 
262
-    $linkToSwap = 'swap.php?swap='.$swapId;
262
+    $linkToSwap = 'swap.php?swap=' . $swapId;
263 263
 
264 264
     $sessionUserId = $_SESSION['userid'];
265 265
 
266 266
     if ($sessionUserId == $ob->oldUserId) {    // if old user accepted swap
267 267
         // notify new user
268
-        $notificationMessage = $ob->oldUserFirstName.' accepted a swap';
268
+        $notificationMessage = $ob->oldUserFirstName . ' accepted a swap';
269 269
         $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
270
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
270
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
271 271
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
272 272
     } elseif ($sessionUserId == $ob->newUserId) {    // if new user accepted swap
273 273
         // notify old user
274
-        $notificationMessage = $ob->newUserFirstName.' accepted a swap';
274
+        $notificationMessage = $ob->newUserFirstName . ' accepted a swap';
275 275
         $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
276
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationId, $notificationMessage);
276
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
277 277
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
278 278
     } elseif (isset($_GET['token'])) { // if accepted by email URL with token
279 279
         // notify whoever requested swap
280 280
         if ($ob->newUserId == $ob->requestedBy) {
281
-            $notificationMessage = 'Swap accepted with '.$ob->oldUserFirstName;
281
+            $notificationMessage = 'Swap accepted with ' . $ob->oldUserFirstName;
282 282
             $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
283
-            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
283
+            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
284 284
             sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
285 285
         } elseif ($ob->oldUserId == $ob->requestedBy) {
286
-            $notificationMessage = 'Swap accepted with '.$ob->newUserFirstName;
286
+            $notificationMessage = 'Swap accepted with ' . $ob->newUserFirstName;
287 287
             $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
288
-            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationId, $notificationMessage);
288
+            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
289 289
             sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
290 290
         } else { // notify both
291
-            $notificationMessageOldUser = 'Swap accepted with '.$ob->newUserFirstName;
292
-            $notificationMessageNewUser = 'Swap accepted with '.$ob->oldUserFirstName;
291
+            $notificationMessageOldUser = 'Swap accepted with ' . $ob->newUserFirstName;
292
+            $notificationMessageNewUser = 'Swap accepted with ' . $ob->oldUserFirstName;
293 293
             $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
294 294
             $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
295
-            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessage);
296
-            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessage);
295
+            createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessage);
296
+            createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessage);
297 297
             sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
298 298
             sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
299 299
         }
300 300
     } else { // notify both users
301 301
         $sessionUserFirstName = getFirstNameWithId($sessionUserId);
302
-        $notificationMessageOldUser = $sessionUserFirstName.' accepted a swap for '.$ob->newUserFirstName;
303
-        $notificationMessageNewUser = $sessionUserFirstName.' accepted a swap for '.$ob->oldUserFirstName;
302
+        $notificationMessageOldUser = $sessionUserFirstName . ' accepted a swap for ' . $ob->newUserFirstName;
303
+        $notificationMessageNewUser = $sessionUserFirstName . ' accepted a swap for ' . $ob->oldUserFirstName;
304 304
         $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
305 305
         $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
306
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessage);
307
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessage);
306
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessage);
307
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessage);
308 308
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
309 309
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
310 310
     }
@@ -336,39 +336,39 @@  discard block
 block discarded – undo
336 336
 
337 337
     $verificationCode = verificationCodeForSwap($swapId);
338 338
 
339
-    $subject = 'Swap declined: '.$ob->newUserName.' - '.$ob->eventDate;
340
-    $message = "The following swap has been declined\r\n\r\n".
341
-                "Date:\t\t ".strftime($ob->time_format_long, strtotime($ob->eventDate))."\r\n".
342
-                "Requested by:\t\t ".$ob->requestedBy."\r\n".
343
-                "Swap from:\t\t ".$ob->oldUserName.' - '.$ob->oldRole."\r\n".
344
-                "Swap to:\t\t ".$ob->newUserName.' - '.$ob->newRole."\r\n";
339
+    $subject = 'Swap declined: ' . $ob->newUserName . ' - ' . $ob->eventDate;
340
+    $message = "The following swap has been declined\r\n\r\n" .
341
+                "Date:\t\t " . strftime($ob->time_format_long, strtotime($ob->eventDate)) . "\r\n" .
342
+                "Requested by:\t\t " . $ob->requestedBy . "\r\n" .
343
+                "Swap from:\t\t " . $ob->oldUserName . ' - ' . $ob->oldRole . "\r\n" .
344
+                "Swap to:\t\t " . $ob->newUserName . ' - ' . $ob->newRole . "\r\n";
345 345
 
346 346
     $from = $ob->siteadmin;
347 347
 
348
-    $linkToSwap = 'swap.php?swap='.$swapId;
348
+    $linkToSwap = 'swap.php?swap=' . $swapId;
349 349
 
350 350
     $sessionUserId = $_SESSION['userid'];
351 351
 
352 352
     if ($sessionUserId == $ob->oldUserId) {    // if old user declines swap
353 353
         // notify new user
354
-        $notificationMessage = $ob->oldUserFirstName.' declined a swap';
354
+        $notificationMessage = $ob->oldUserFirstName . ' declined a swap';
355 355
         $notificationId = createNotificationForUser($ob->newUserId, $notificationMessage, $message, 'swap', $linkToSwap);
356
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
356
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
357 357
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
358 358
     } elseif ($sessionUserId == $ob->newUserId) {    // if new user declines swap
359 359
         // notify old user
360
-        $notificationMessage = $ob->newUserFirstName.' declined a swap';
360
+        $notificationMessage = $ob->newUserFirstName . ' declined a swap';
361 361
         $notificationId = createNotificationForUser($ob->oldUserId, $notificationMessage, $message, 'swap', $linkToSwap);
362
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationId, $notificationMessage);
362
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationId, $notificationMessage);
363 363
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
364 364
     } else { // notify both users
365 365
         $sessionUserFirstName = getFirstNameWithId($sessionUserId);
366
-        $notificationMessageOldUser = $sessionUserFirstName.' declined a swap for '.$ob->newUserFirstName;
367
-        $notificationMessageNewUser = $sessionUserFirstName.' declined a swap for '.$ob->oldUserFirstName;
366
+        $notificationMessageOldUser = $sessionUserFirstName . ' declined a swap for ' . $ob->newUserFirstName;
367
+        $notificationMessageNewUser = $sessionUserFirstName . ' declined a swap for ' . $ob->oldUserFirstName;
368 368
         $notificationIdOldUser = createNotificationForUser($ob->oldUserId, $notificationMessageOldUser, $message, 'swap', $linkToSwap);
369 369
         $notificationIdNewUser = createNotificationForUser($ob->newUserId, $notificationMessageNewUser, $message, 'swap', $linkToSwap);
370
-        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id='.$notificationIdOldUser, $notificationMessage);
371
-        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id='.$notificationIdNewUser, $notificationMessage);
370
+        createFacebookNotificationForUser($ob->oldUserId, 'notification.php?id=' . $notificationIdOldUser, $notificationMessage);
371
+        createFacebookNotificationForUser($ob->newUserId, 'notification.php?id=' . $notificationIdNewUser, $notificationMessage);
372 372
         sendMail(getEmailWithId($ob->newUserId), $subject, $message, $from);
373 373
         sendMail(getEmailWithId($ob->oldUserId), $subject, $message, $from);
374 374
     }
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
     $stmt = mysqli_prepare(db(), $sql);
544 544
     mysqli_stmt_bind_param($stmt, 'i', $seriesId);
545 545
     if (!mysqli_stmt_execute($stmt)) {
546
-        exit('Error: '.mysqli_error(db()));
546
+        exit('Error: ' . mysqli_error(db()));
547 547
     }
548 548
     mysqli_stmt_close($stmt);
549 549
 }
@@ -555,14 +555,14 @@  discard block
 block discarded – undo
555 555
     mysqli_stmt_bind_param($stmt, 'ii', $bandId, $userRoleId);
556 556
 
557 557
     if (!mysqli_stmt_execute($stmt)) {
558
-        exit('Error: '.mysqli_error(db()));
558
+        exit('Error: ' . mysqli_error(db()));
559 559
     }
560 560
     mysqli_stmt_close($stmt);
561 561
 }
562 562
 
563 563
 function getEventUrl($eventId)
564 564
 {
565
-    return 'event.php?id='.$eventId;
565
+    return 'event.php?id=' . $eventId;
566 566
 }
567 567
 
568 568
 function getEventDetails($eventID, $separator, $type = 4, $apprev_description = true, $prefix = '')
@@ -601,9 +601,9 @@  discard block
 block discarded – undo
601 601
 						e.id = ? ';
602 602
 
603 603
     if ($type == 1) {
604
-        $sql = $sql."AND ((g.id in (10,11)) OR (g.id=2 and u.firstname='Team')) ";
604
+        $sql = $sql . "AND ((g.id in (10,11)) OR (g.id=2 and u.firstname='Team')) ";
605 605
     }
606
-    $sql = $sql.'ORDER BY e.id, g.id desc, role, firstname, lastname ';
606
+    $sql = $sql . 'ORDER BY e.id, g.id desc, role, firstname, lastname ';
607 607
 
608 608
     $stmt = mysqli_prepare(db(), $sql);
609 609
     mysqli_stmt_bind_param($stmt, 'i', $eventID);
@@ -624,32 +624,32 @@  discard block
 block discarded – undo
624 624
 
625 625
         $firstname = $row['firstname'];
626 626
         if ($firstname != 'Team') {
627
-            $firstname = ltrim(substr($firstname, 0, 1).'.', '.');
627
+            $firstname = ltrim(substr($firstname, 0, 1) . '.', '.');
628 628
         }
629 629
 
630 630
         $lastname = $row['lastname'];
631 631
 
632
-        $returnValue = $returnValue.$separator;
632
+        $returnValue = $returnValue . $separator;
633 633
         switch ($type) {
634 634
             case 0:
635 635
                 //all persons of event
636 636
                 //break;    ->  no special handling, fallthrough to case 1
637 637
             case 1:
638 638
                 //only persons with groupID in 10,11,2  ->  handled in sql query
639
-                $returnValue = $returnValue.$prefix.ltrim($group.': ');
640
-                $returnValue = $returnValue.trim($firstname.' '.$lastname);
639
+                $returnValue = $returnValue . $prefix . ltrim($group . ': ');
640
+                $returnValue = $returnValue . trim($firstname . ' ' . $lastname);
641 641
                 break;
642 642
             case 2:
643 643
                 //only event date and event type
644
-                $returnValue = $returnValue.strftime($time_format_normal, strtotime($eventDate));
645
-                $returnValue = $returnValue.$separator;
646
-                $returnValue = $returnValue.$eventType;
644
+                $returnValue = $returnValue . strftime($time_format_normal, strtotime($eventDate));
645
+                $returnValue = $returnValue . $separator;
646
+                $returnValue = $returnValue . $eventType;
647 647
 
648 648
                 return trim(substr($returnValue, strlen($separator) - 1)); //ends while loop
649 649
                 break;
650 650
             case 4:
651 651
                 //only event type
652
-                $returnValue = $returnValue.$eventType;
652
+                $returnValue = $returnValue . $eventType;
653 653
 
654 654
                 return trim(substr($returnValue, strlen($separator) - 1)); //ends while loop
655 655
                 break;
Please login to merge, or discard this patch.
public/old/includes/functions.users.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
     // create username and remove all whitespace
38
-    $username = $firstNameLower.'.'.$lastNameLower;
38
+    $username = $firstNameLower . '.' . $lastNameLower;
39 39
     $username = preg_replace('/\s+/', '', $username);
40 40
 
41 41
     $sql = "INSERT INTO users (firstName, lastName, username, email, mobile, password, created, updated)
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
     $id = mysqli_insert_id(db());
49 49
 
50 50
     $notificationMessage = "Welcome to your new account on the rota system.\n
51
-If you have any issues, please get in touch with us [".siteSettings()->getAdminEmailAddress().'](mailto:'.siteSettings()->getAdminEmailAddress().").\n
51
+If you have any issues, please get in touch with us [".siteSettings()->getAdminEmailAddress() . '](mailto:' . siteSettings()->getAdminEmailAddress() . ").\n
52 52
 ---\n
53 53
 **Sync to digital calendar**\n
54 54
 You may wish to link the rota to your digital calendar on your computer and phone.  To do so, generate a [calendar token](calendarTokens.php) which will present you with your unique URL.  Follow instructions from your digital calendar provider for exact details on how import an iCal feed, or get in touch and we may be able to help.\n";
55 55
 
56
-    createNotificationForUser($id, 'Welcome '.$firstName, $notificationMessage, 'feature');
56
+    createNotificationForUser($id, 'Welcome ' . $firstName, $notificationMessage, 'feature');
57 57
     createNotificationForUser($id, 'Change your password', 'Please change your password to something unique and memorable.', 'account', 'editPassword.php');
58 58
 
59 59
     return $id;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     $result = mysqli_stmt_get_result($stmt);
151 151
     $ob = mysqli_fetch_object($result);
152 152
     mysqli_stmt_close($stmt);
153
-    $name = $ob->firstName.' '.$ob->lastName;
153
+    $name = $ob->firstName . ' ' . $ob->lastName;
154 154
 
155 155
     return $name;
156 156
 }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     mysqli_stmt_bind_param($stmt, 'ssi', $hashedPassword, $currentTimestamp, $userId);
243 243
     mysqli_stmt_execute($stmt) or exit(mysqli_error(db()));
244 244
     mysqli_stmt_close($stmt);
245
-    insertStatistics('user', __FILE__, 'password force changed for user '.getNameWithId($userId), null, $_SERVER['HTTP_USER_AGENT']);
245
+    insertStatistics('user', __FILE__, 'password force changed for user ' . getNameWithId($userId), null, $_SERVER['HTTP_USER_AGENT']);
246 246
 }
247 247
 
248 248
 function hashPassword($plainTextPassword)
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     if ($loginFailures < $numberOfAllowedAttempts) {
289 289
         return true;
290 290
     } else {
291
-        insertStatistics('user', __FILE__, 'Login attempts exceeded for username: '.$username, $ipAddress, $_SERVER['HTTP_USER_AGENT']);
291
+        insertStatistics('user', __FILE__, 'Login attempts exceeded for username: ' . $username, $ipAddress, $_SERVER['HTTP_USER_AGENT']);
292 292
 
293 293
         return false;
294 294
     }
@@ -376,11 +376,11 @@  discard block
 block discarded – undo
376 376
     $pendingId = mysqli_insert_id(db());
377 377
     mysqli_stmt_close($stmt);
378 378
 
379
-    $linkToApprove = 'pendingAccounts.php?id='.$pendingId;
379
+    $linkToApprove = 'pendingAccounts.php?id=' . $pendingId;
380 380
 
381
-    $email = siteSettings()->getOwner().'<'.siteSettings()->getAdminEmailAddress().'>';
382
-    $subject = $firstName.' requested an account';
383
-    $message = $subject.' through '.$source.".\nApprove or decline: ".siteSettings()->getSiteUrl().'/'.$linkToApprove;
381
+    $email = siteSettings()->getOwner() . '<' . siteSettings()->getAdminEmailAddress() . '>';
382
+    $subject = $firstName . ' requested an account';
383
+    $message = $subject . ' through ' . $source . ".\nApprove or decline: " . siteSettings()->getSiteUrl() . '/' . $linkToApprove;
384 384
 
385 385
     sendMail($email, $subject, $message, $email);
386 386
 
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     addSocialAuthToUserWithId($userId, $pendingUser->socialId, $pendingUser->source);
473 473
     updateUser($userId, $pendingUser->firstName, $pendingUser->lastName, $pendingUser->email, null);
474 474
 
475
-    createNotificationForUser($userId, 'Social Login added: '.$pendingUser->source, 'Your social media login details for '.$pendingUser->source.' have been added to your existing account', 'account');
475
+    createNotificationForUser($userId, 'Social Login added: ' . $pendingUser->source, 'Your social media login details for ' . $pendingUser->source . ' have been added to your existing account', 'account');
476 476
     createFacebookNotificationForUser($userId, 'login.php', 'Your account request has been approved. You can now login via Facebook.');
477 477
 
478 478
     return true;
@@ -587,25 +587,25 @@  discard block
 block discarded – undo
587 587
     if ($user->socialId) {
588 588
         switch ($size) {
589 589
             case 'small': // 50px x 50px
590
-                return '//graph.facebook.com/'.$user->socialId.'/picture?type=square';
590
+                return '//graph.facebook.com/' . $user->socialId . '/picture?type=square';
591 591
                 break;
592 592
             case 'large': // 200px x 200px
593
-                return '//graph.facebook.com/'.$user->socialId.'/picture?type=large';
593
+                return '//graph.facebook.com/' . $user->socialId . '/picture?type=large';
594 594
                 break;
595 595
             default:
596
-                return '//graph.facebook.com/'.$user->socialId.'/picture';
596
+                return '//graph.facebook.com/' . $user->socialId . '/picture';
597 597
                 break;
598 598
         }
599 599
     } else {
600 600
         switch ($size) {
601 601
             case 'small': // 50px x 50px
602
-                return '//www.gravatar.com/avatar/'.md5(strtolower(trim($user->email))).'?s=50&d=mm';
602
+                return '//www.gravatar.com/avatar/' . md5(strtolower(trim($user->email))) . '?s=50&d=mm';
603 603
                 break;
604 604
             case 'large': // 200px x 200px
605
-                return '//www.gravatar.com/avatar/'.md5(strtolower(trim($user->email))).'?s=200&d=mm';
605
+                return '//www.gravatar.com/avatar/' . md5(strtolower(trim($user->email))) . '?s=200&d=mm';
606 606
                 break;
607 607
             default:
608
-                return '//www.gravatar.com/avatar/'.md5(strtolower(trim($user->email))).'?s=50&d=mm';
608
+                return '//www.gravatar.com/avatar/' . md5(strtolower(trim($user->email))) . '?s=50&d=mm';
609 609
                 break;
610 610
         }
611 611
     }
Please login to merge, or discard this patch.
public/old/includes/functions.database.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
 function executeDbSql($sql)
25 25
 {
26 26
     if (!mysqli_query(db(), $sql)) {
27
-        exit('Error: '.mysqli_error(db()).', SQL: '.$sql);
27
+        exit('Error: ' . mysqli_error(db()) . ', SQL: ' . $sql);
28 28
     }
29 29
 }
30 30
 
31 31
 function updateDatabase()
32 32
 {
33 33
     $sql = 'SELECT VERSION( ) AS mysqli_version';
34
-    $result = mysqli_query(db(), $sql) or exit('MySQL-Error: '.mysqli_error(db()));
34
+    $result = mysqli_query(db(), $sql) or exit('MySQL-Error: ' . mysqli_error(db()));
35 35
     $dbv = mysqli_fetch_array($result, MYSQLI_ASSOC);
36 36
     $mysqli_version = $dbv['mysqli_version'];
37 37
     //echo $mysqli_version."<br>";
@@ -85,41 +85,41 @@  discard block
 block discarded – undo
85 85
             executeDbSql("alter table users add(isOverviewRecipient char(2) NOT NULL DEFAULT '0')");
86 86
             executeDbSql('alter table groups add(short_name char(2))');
87 87
 
88
-            executeDbSql("update settings set lang_locale = 'en_GB'");                     // de_DE
88
+            executeDbSql("update settings set lang_locale = 'en_GB'"); // de_DE
89 89
             executeDbSql('update settings set event_sorting_latest = 0');
90 90
             executeDbSql('update settings set snapshot_show_two_month = 0');
91 91
             executeDbSql('update settings set snapshot_reduce_skills_by_group = 0');
92 92
             executeDbSql('update settings set logged_in_show_snapshot_button = 0');
93 93
             executeDbSql("update settings set time_format_long = '%A, %B %e @ %I:%M %p'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V
94 94
             executeDbSql("update settings set time_format_normal = '%m/%d/%y %I:%M %p'"); // de_DE: %d.%m.%Y %H:%M
95
-            executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
95
+            executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
96 96
             executeDbSql("update settings set version = '2.1.0'");
97 97
             executeDbSql('update settings set users_start_with_myevents = 0');
98 98
             executeDbSql("update settings set time_zone = 'Europe/London'"); //de_DE: Europe/Berlin
99 99
             executeDbSql("update settings set google_group_calendar = ''");
100 100
             executeDbSql("update 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'");
101 101
 
102
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.1.0', $_SESSION['userid']);
102
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.1.0', $_SESSION['userid']);
103 103
         case '2.1.0':
104 104
             executeDbSql('create table settings_bkp2_1_0 as select * from settings');
105 105
             executeDbSql('alter table settings add(group_sorting_name int(1))');
106 106
             executeDbSql("update settings set version = '2.1.1'");
107
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.1.1', $_SESSION['userid']);
107
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.1.1', $_SESSION['userid']);
108 108
         case '2.1.1':
109 109
             executeDbSql("update settings set version = '2.1.2'");
110
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.1.2', $_SESSION['userid']);
110
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.1.2', $_SESSION['userid']);
111 111
         case '2.1.2':
112 112
             executeDbSql("alter table settings add(debug_mode int(1) DEFAULT '0')");
113
-            executeDbSql('update settings set group_sorting_name = 0');  //was a workaround, fixed in V2.2.1
113
+            executeDbSql('update settings set group_sorting_name = 0'); //was a workaround, fixed in V2.2.1
114 114
 
115 115
             executeDbSql("update settings set version = '2.2.0'");
116
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.2.0', $_SESSION['userid']);
116
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.2.0', $_SESSION['userid']);
117 117
         case '2.2.0':
118 118
             executeDbSql("alter table users add(isBandAdmin char(2) NOT NULL DEFAULT '0')");
119 119
             executeDbSql('update settings set group_sorting_name = 0'); //due to an error reset it again
120 120
 
121 121
             executeDbSql("update settings set version = '2.2.1'");
122
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.2.1', $_SESSION['userid']);
122
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.2.1', $_SESSION['userid']);
123 123
         case '2.2.1':
124 124
             $sql = "CREATE TABLE IF NOT EXISTS `statistics` (
125 125
 				  `id` int(11) NOT NULL AUTO_INCREMENT,
@@ -135,21 +135,21 @@  discard block
 block discarded – undo
135 135
             executeDbSql($sql);
136 136
 
137 137
             executeDbSql("update settings set version = '2.3.0'");
138
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.3.0', $_SESSION['userid']);
138
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.3.0', $_SESSION['userid']);
139 139
             insertStatistics('system', __FILE__, 'db-update', '2.3.0', $version);
140 140
         case '2.3.0':
141 141
             executeDbSql("alter table users add(isEventEditor char(2) NOT NULL DEFAULT '0')");
142 142
 
143 143
             executeDbSql("update settings set version = '2.3.1'");
144
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.3.1', $_SESSION['userid']);
144
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.3.1', $_SESSION['userid']);
145 145
             insertStatistics('system', __FILE__, 'db-update', '2.3.1', $version);
146 146
         case '2.3.1':
147 147
             executeDbSql("update settings set version = '2.3.2'");
148
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.3.2', $_SESSION['userid']);
148
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.3.2', $_SESSION['userid']);
149 149
             insertStatistics('system', __FILE__, 'db-update', '2.3.2', $version);
150 150
         case '2.3.2':
151 151
             executeDbSql("update settings set version = '2.3.3'");
152
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.3.3', $_SESSION['userid']);
152
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.3.3', $_SESSION['userid']);
153 153
             insertStatistics('system', __FILE__, 'db-update', '2.3.3', $version);
154 154
         case '2.3.3':
155 155
             if (substr($mysqli_version, 0, 1) == 5) {
@@ -198,33 +198,33 @@  discard block
 block discarded – undo
198 198
                 );
199 199
             }
200 200
             executeDbSql("update settings set version = '2.3.4'");
201
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.3.4', $_SESSION['userid']);
201
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.3.4', $_SESSION['userid']);
202 202
             insertStatistics('system', __FILE__, 'db-update', '2.3.4', $version);
203 203
         case '2.3.4':
204 204
             executeDbSql("update settings set version = '2.3.5'");
205
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.3.5', $_SESSION['userid']);
205
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.3.5', $_SESSION['userid']);
206 206
             insertStatistics('system', __FILE__, 'db-update', '2.3.5', $version);
207 207
         case '2.3.5':
208 208
             executeDbSql("update settings set version = '2.4.0'");
209
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.4.0', $_SESSION['userid']);
209
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.4.0', $_SESSION['userid']);
210 210
             insertStatistics('system', __FILE__, 'db-update', '2.4.0', $version);
211 211
         case '2.4.0':
212 212
             executeDbSql("update settings set version = '2.4.1'");
213
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.4.1', $_SESSION['userid']);
213
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.4.1', $_SESSION['userid']);
214 214
             insertStatistics('system', __FILE__, 'db-update', '2.4.1', $version);
215 215
         case '2.4.1':
216 216
             executeDbSql('alter table settings add(days_to_alert int(2) DEFAULT 5) ');
217 217
             executeDbSql("alter table settings add(token varchar(100) DEFAULT '') ");
218 218
             executeDbSql("update settings set version = '2.4.2'");
219
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.4.2', $_SESSION['userid']);
219
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.4.2', $_SESSION['userid']);
220 220
             insertStatistics('system', __FILE__, 'db-update', '2.4.2', $version);
221 221
         case '2.4.2':
222 222
             executeDbSql("update settings set version = '2.4.3'");
223
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.4.3', $_SESSION['userid']);
223
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.4.3', $_SESSION['userid']);
224 224
             insertStatistics('system', __FILE__, 'db-update', '2.4.3', $version);
225 225
         case '2.4.3':
226 226
             executeDbSql("update settings set version = '2.4.4'");
227
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.4.4', $_SESSION['userid']);
227
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.4.4', $_SESSION['userid']);
228 228
             insertStatistics('system', __FILE__, 'db-update', '2.4.4', $version);
229 229
         case '2.4.4':
230 230
             if (substr($mysqli_version, 0, 1) == 5) {
@@ -274,27 +274,27 @@  discard block
 block discarded – undo
274 274
                 );
275 275
             }
276 276
             executeDbSql("update settings set version = '2.4.5'");
277
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.4.5', $_SESSION['userid']);
277
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.4.5', $_SESSION['userid']);
278 278
             insertStatistics('system', __FILE__, 'db-update', '2.4.5', $version);
279 279
         case '2.4.5':
280 280
             executeDbSql("update settings set version = '2.5.0'");
281
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.5.0', $_SESSION['userid']);
281
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.5.0', $_SESSION['userid']);
282 282
             insertStatistics('system', __FILE__, 'db-update', '2.5.0', $version);
283 283
         case '2.5.0':
284 284
             executeDbSql("update settings set version = '2.5.1'");
285
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.5.1', $_SESSION['userid']);
285
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.5.1', $_SESSION['userid']);
286 286
             insertStatistics('system', __FILE__, 'db-update', '2.5.1', $version);
287 287
         case '2.5.1':
288 288
             executeDbSql("update settings set version = '2.5.2'");
289
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.5.2', $_SESSION['userid']);
289
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.5.2', $_SESSION['userid']);
290 290
             insertStatistics('system', __FILE__, 'db-update', '2.5.2', $version);
291 291
         case '2.5.2':
292 292
             executeDbSql("update settings set version = '2.5.3'");
293
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.5.3', $_SESSION['userid']);
293
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.5.3', $_SESSION['userid']);
294 294
             insertStatistics('system', __FILE__, 'db-update', '2.5.3', $version);
295 295
         case '2.5.3':
296 296
             executeDbSql("update settings set version = '2.6.0'");
297
-            notifyInfo(__FILE__, 'db-update='.$version.'->2.6.0', $_SESSION['userid']);
297
+            notifyInfo(__FILE__, 'db-update=' . $version . '->2.6.0', $_SESSION['userid']);
298 298
             insertStatistics('system', __FILE__, 'db-update', '2.6.0', $version);
299 299
         case '2.6.0':
300 300
             $sql = "ALTER TABLE users
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
             executeDbSql($sql);
371 371
             executeDbSql("update settings set version = '3.0.0-pre1'");
372 372
 
373
-            notifyInfo(__FILE__, 'db-update='.$version.'->3.0.0-pre1', $_SESSION['userid']);
373
+            notifyInfo(__FILE__, 'db-update=' . $version . '->3.0.0-pre1', $_SESSION['userid']);
374 374
             insertStatistics('system', __FILE__, 'db-update', '3.0.0-pre1', $version);
375 375
         case '3.0.0-pre1':
376 376
             $sql = "CREATE TABLE IF NOT EXISTS notifications (
Please login to merge, or discard this patch.