Completed
Push — master ( c28ce4...f8f581 )
by Christopher
14:59 queued 07:10
created
public/old/recordingUpload.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 
35 35
 // get token
36 36
 $response = $client->request(
37
-  'POST',
38
-  'v3/tokens.json',
39
-  ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'],
40
-                       'email' => siteConfig()['recording']['locomotivecms']['email'], ]]
41
-  );
37
+    'POST',
38
+    'v3/tokens.json',
39
+    ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'],
40
+                        'email' => siteConfig()['recording']['locomotivecms']['email'], ]]
41
+    );
42 42
 if ($response->getStatusCode() == 201) {
43 43
     $token = json_decode($response->getBody())->token;
44 44
 }
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 // test token
47 47
 if (isset($token)) {
48 48
     $response = $client->request(
49
-  'GET',
50
-  'v3/my_account.json',
51
-  ['query' => ['auth_token' => $token]]);
49
+    'GET',
50
+    'v3/my_account.json',
51
+    ['query' => ['auth_token' => $token]]);
52 52
     var_dump($response);
53 53
 } else {
54 54
     echo '<p>Unable to connect to main site</p>';
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 // only load page if functionality enabled
20 20
 if (siteConfig()['recording']['type'] != 'locomotivecms') {
21 21
     echo '<p>This feature is not enabled</p>';
22
-    echo '<p><a href='.siteSettings()->getSiteUrl().'>&lt; back to homepage</a></p>';
22
+    echo '<p><a href=' . siteSettings()->getSiteUrl() . '>&lt; back to homepage</a></p>';
23 23
     exit;
24 24
 }
25 25
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 $client = new Client([
29 29
     // Base URI is used with relative requests
30
-    'base_uri' => siteConfig()['recording']['locomotivecms']['url'].'/locomotive/api/',
30
+    'base_uri' => siteConfig()['recording']['locomotivecms']['url'] . '/locomotive/api/',
31 31
     // You can set any number of default request options.
32 32
     'timeout' => 2.0,
33 33
 ]);
@@ -52,6 +52,6 @@  discard block
 block discarded – undo
52 52
     var_dump($response);
53 53
 } else {
54 54
     echo '<p>Unable to connect to main site</p>';
55
-    echo '<p><a href='.siteSettings()->getSiteUrl().'>&lt; back to homepage</a></p>';
55
+    echo '<p><a href=' . siteSettings()->getSiteUrl() . '>&lt; back to homepage</a></p>';
56 56
     exit;
57 57
 }
Please login to merge, or discard this patch.
public/old/emailGroup.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/createEvent.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -567,7 +567,8 @@  discard block
 block discarded – undo
567 567
 											<?php if (!$userRole->getReserve()): ?>
568 568
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
569 569
 											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
570
-											<?php else: ?>
570
+											<?php else {
571
+    : ?>
571 572
 											<?php $countReserve += 1 ?>
572 573
 											<?php endif //!userRole->getReserve?>
573 574
 										<?php endforeach //users?>
@@ -646,4 +647,6 @@  discard block
 block discarded – undo
646 647
   </div><!-- /.createSeries -->
647 648
 
648 649
 
649
-<?php include 'includes/footer.php'; ?>
650
+<?php include 'includes/footer.php';
651
+}
652
+?>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 if (($userisBandAdmin) || ($userisEventEditor) || (isAdmin())) {
46 46
     // Just continue the code
47 47
 } else {
48
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
48
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
49 49
 }
50 50
 
51 51
 if ($userisBandAdmin) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $location = $row['location'];
83 83
         $locationname = $row['locationname'];
84 84
         if ($action == 'edit') {
85
-            $formaction = '?action=edit&id='.$id;
85
+            $formaction = '?action=edit&id=' . $id;
86 86
         } else {
87 87
             $formaction = '';
88 88
         }
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 
137 137
     // convert format of date
138 138
     $date = str_replace('/', '-', $date); // ensure it isn't read as mm/dd/yyyy
139
-    $date = strftime('%Y-%m-%d', strtotime($date.' 00:00:00'));
140
-    $date = $date.' '.$time.':00';
139
+    $date = strftime('%Y-%m-%d', strtotime($date . ' 00:00:00'));
140
+    $date = $date . ' ' . $time . ':00';
141 141
     $date = mysqli_real_escape_string(db(), $date);
142 142
 
143 143
     if ($action == 'edit') {
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
         //if ($userisBandAdmin) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid=2)";
208 208
         //if ($userisEventEditor) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid!=2)";
209 209
         if ($userisBandAdmin) {
210
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where groupid in (2,3,4))';
210
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where groupid in (2,3,4))';
211 211
         }
212 212
         if ($userisEventEditor) {
213
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where not (groupid in (2,3,4)))';
213
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where not (groupid in (2,3,4)))';
214 214
         }
215 215
         mysqli_query(db(), $delete_all_sql) or die(mysqli_error(db()));
216 216
     }
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
     // redirect
219 219
     if (isset($_SESSION['lastEventsFilter'])) {
220 220
         $type = $_SESSION['lastEventsFilter'];
221
-        header('Location: events.php?view=all&filter='.$type.'#event'.$eventID);
221
+        header('Location: events.php?view=all&filter=' . $type . '#event' . $eventID);
222 222
     } else {
223
-        header('Location: events.php?view=all#event'.$eventID);
223
+        header('Location: events.php?view=all#event' . $eventID);
224 224
     }
225 225
     exit;
226 226
 }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                                         while ($ob = mysqli_fetch_object($result)) {
298 298
                                             if (!(isset($type) && $ob->id == $type)) {
299 299
                                                 $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime));
300
-                                                echo "<option value='".$ob->id."' title='".$ob->description."' data-time='".($defaultTime == '00:00' ? '' : $defaultTime)."' data-location='".(is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId)."'>".$ob->name.'</option>';
300
+                                                echo "<option value='" . $ob->id . "' title='" . $ob->description . "' data-time='" . ($defaultTime == '00:00' ? '' : $defaultTime) . "' data-location='" . (is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId) . "'>" . $ob->name . '</option>';
301 301
                                             }
302 302
                                         } ?>
303 303
 									</select>
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
324 324
                                             if (isset($subtype) && $row['id'] == $subtype) {
325 325
                                             } else {
326
-                                                echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
326
+                                                echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
327 327
                                             }
328 328
                                         } ?>
329 329
 									</select>
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
352 352
                                             if (isset($location) && $row['id'] == $location) {
353 353
                                             } else {
354
-                                                echo "<option value='".$row['id']."'>".$row['name'].'</option>';
354
+                                                echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
355 355
                                             }
356 356
                                         } ?>
357 357
 									</select>
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
                                     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
483 483
                                         if (isset($type) && $row['id'] == $type) {
484 484
                                         } else {
485
-                                            echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
485
+                                            echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
486 486
                                         }
487 487
                                     } ?>
488 488
 								</select>
@@ -552,8 +552,8 @@  discard block
 block discarded – undo
552 552
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
553 553
 											<?php if (!$userRole->getReserve()): ?>
554 554
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
555
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
556
-											<?php else: ?>
555
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
556
+											<?php else : ?>
557 557
 											<?php $countReserve += 1 ?>
558 558
 											<?php endif //!userRole->getReserve?>
559 559
 										<?php endforeach //users?>
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
564 564
 											<?php if ($userRole->getReserve()): ?>
565 565
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
566
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
566
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
567 567
 											<?php endif ?>
568 568
 										<?php endforeach //users?>
569 569
 										</optgroup>
Please login to merge, or discard this patch.
public/old/editRole.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 }
35 35
 
36 36
 if (!isAdmin()) {
37
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
37
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
38 38
     exit;
39 39
 }
40 40
 
Please login to merge, or discard this patch.
public/old/events.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -435,8 +435,10 @@
 block discarded – undo
435 435
 
436 436
                             echo '</li>';
437 437
                         }
438
-        echo '</ul>'; else:
438
+        echo '</ul>'; else {
439
+            :
439 440
                         echo '<p>No roles assigned to this event.';
441
+        }
440 442
         endif; ?>
441 443
 			</div><!-- /.user-roles -->
442 444
 		</div><!-- /.box-body -->
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 } else {
49 49
     $urlFilters = '';
50 50
     if (isset($_SESSION['lastEventsFilter'])) {
51
-        $urlFilters = '&filter='.$_SESSION['lastEventsFilter'];
51
+        $urlFilters = '&filter=' . $_SESSION['lastEventsFilter'];
52 52
     }
53
-    header('Location: events.php?view=all'.$urlFilters);
53
+    header('Location: events.php?view=all' . $urlFilters);
54 54
     exit;
55 55
 }
56 56
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         session_destroy();
71 71
         header('Location: login.php');
72 72
     } else {
73
-        header('Location: events.php?view='.$sessionUserID);
73
+        header('Location: events.php?view=' . $sessionUserID);
74 74
         exit;
75 75
     }
76 76
 }
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
     if ($editskillID != '') {
109 109
         $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')");
110 110
         if (!mysqli_query(db(), $sql)) {
111
-            die('Error: '.mysqli_error(db()));
111
+            die('Error: ' . mysqli_error(db()));
112 112
         }
113 113
 
114 114
         // After we have inserted the data, we want to head back to the main page
115
-        header('Location: index.php#section'.$editeventID);
115
+        header('Location: index.php#section' . $editeventID);
116 116
         exit;
117 117
     }
118 118
 
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
 
126 126
             $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')");
127 127
             if (!mysqli_query(db(), $sql)) {
128
-                die('Error: '.mysqli_error(db()));
128
+                die('Error: ' . mysqli_error(db()));
129 129
             }
130 130
         }
131 131
 
132 132
         // After we have inserted the data, we want to head back to the main page
133
-        header('Location: index.php#section'.$editeventID);
133
+        header('Location: index.php#section' . $editeventID);
134 134
         exit;
135 135
     }
136 136
 }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     $result = mysqli_query(db(), $mysqli_query) or die(mysqli_error(db()));
177 177
                     $row = mysqli_fetch_object($result);
178 178
 
179
-                    echo $row->name.'s';
179
+                    echo $row->name . 's';
180 180
                 } elseif ($_SESSION['onlyShowUserEvents'] == '1') {
181 181
                     echo 'My Events';
182 182
                 } else {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
 			<?php if (!empty($pendingSwaps) && $pendingSwaps > 0):
204 204
                 if ($pendingSwaps > 1) {
205
-                    $swapsMessage = $pendingSwaps.' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.';
205
+                    $swapsMessage = $pendingSwaps . ' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.';
206 206
                 } else {
207 207
                     $swapsMessage = 'A swap is pending approval. An email has been sent to the person covering to approve the swap.';
208 208
                 } ?>
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 							WHERE e.type = '$filter'
269 269
 							AND e.date >= DATE(NOW())
270 270
 							AND e.removed = 0
271
-							ORDER BY ".$dateOrderBy;
271
+							ORDER BY " . $dateOrderBy;
272 272
     } else {
273 273
         $sql = "SELECT
274 274
 							DISTINCT e.id AS id,
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 							WHERE e.date >= DATE(NOW())
296 296
 							AND ur.userId = '$view'
297 297
 							AND e.removed = 0
298
-							ORDER BY ".$dateOrderBy;
298
+							ORDER BY " . $dateOrderBy;
299 299
     }
300 300
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
301 301
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         $newMonth = strftime('%B %Y', strtotime($row->sundayDate));
314 314
         if ($month != $newMonth) {
315 315
             $month = $newMonth;
316
-            echo '<li class="time-label"><span class="bg-green">'.$month.'</span></li>';
316
+            echo '<li class="time-label"><span class="bg-green">' . $month . '</span></li>';
317 317
         }
318 318
 
319 319
         // Event details?>
@@ -327,9 +327,9 @@  discard block
 block discarded – undo
327 327
 						<h4><?php
328 328
                             echo date('jS: ', strtotime($row->sundayDate));
329 329
         if ($eventName != '') {
330
-            echo '<strong>'.$eventName.'</strong><br />'.$subType.' - <em>'.$type.'</em>';
330
+            echo '<strong>' . $eventName . '</strong><br />' . $subType . ' - <em>' . $type . '</em>';
331 331
         } else {
332
-            echo $subType.' - <em>'.$type.'</em>';
332
+            echo $subType . ' - <em>' . $type . '</em>';
333 333
         } ?>
334 334
 						</h4>
335 335
 					</a>
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 				<?php //<p><strong>Rehearsal:</strong> <?php
342 342
                 //echo ($row->rehearsalDateFormatted = "0000-00-00 00:00:00") ? "none" : strftime(siteSettings()->time_format_normal,strtotime($row->rehearsalDateFormatted));</p>?>
343 343
 
344
-				<p><strong><?php echo $row->eventGroup ? $row->eventGroup.': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '('.$row->bibleVerse.')' : '' ?></p>
344
+				<p><strong><?php echo $row->eventGroup ? $row->eventGroup . ': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '(' . $row->bibleVerse . ')' : '' ?></p>
345 345
 
346 346
 				<p><strong>Location:</strong> <?php echo $row->eventLocation; ?></p>
347 347
 
@@ -407,16 +407,16 @@  discard block
 block discarded – undo
407 407
                                 } else {
408 408
                                     echo '</ul>';
409 409
                                 }
410
-                                echo '<p><strong>'.$groupName.'</strong></p>';
410
+                                echo '<p><strong>' . $groupName . '</strong></p>';
411 411
                                 echo '<ul>';
412 412
                             }
413 413
 
414 414
                             echo '<li>';
415
-                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : '';
415
+                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : '';
416 416
                             echo $viewPeople->name;
417 417
 
418 418
                             if ($viewPeople->rolename != '') {
419
-                                echo ' - <em>'.$viewPeople->rolename.'</em>';
419
+                                echo ' - <em>' . $viewPeople->rolename . '</em>';
420 420
                             } else {
421 421
                                 // If there is no skill, we don't need to mention this.
422 422
                             }
@@ -442,9 +442,9 @@  discard block
 block discarded – undo
442 442
 
443 443
 				<?php
444 444
                 if (isAdmin() || $userisBandAdmin || $userisEventEditor) {
445
-                    echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=".$eventID."'><i class='fa fa-pencil'></i><span> &nbsp;Edit</span></a> "; /* Edit event */
446
-                    echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=".$eventID."'><i class='fa fa-pencil'></i><span> &nbsp;Copy</span></a> "; /* Edit event */
447
-                    echo " <a class ='btn btn-primary' href='emailEvent.php?event=".$eventID."'><i class='fa fa-envelope-o'></i><span> &nbsp;Send email</span></a> "; /* Send email */
445
+                    echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> &nbsp;Edit</span></a> "; /* Edit event */
446
+                    echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> &nbsp;Copy</span></a> "; /* Edit event */
447
+                    echo " <a class ='btn btn-primary' href='emailEvent.php?event=" . $eventID . "'><i class='fa fa-envelope-o'></i><span> &nbsp;Send email</span></a> "; /* Send email */
448 448
                 }
449 449
         if (isAdmin()) {
450 450
             //echo "<a class='btn btn-primary' href='index.php?notifyEveryone=true&eventID=$eventID'><i class='fa fa-envelope-o'></i><span> &nbsp;Send email</span></a> "; /* Send email */
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 
454 454
             echo "<ul class='dropdown-menu'>";
455 455
 
456
-            echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal".$eventID."'>Delete</button></li>"; /* Delete Event */
456
+            echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal" . $eventID . "'>Delete</button></li>"; /* Delete Event */
457 457
 
458 458
             echo '</ul>';
459 459
         } ?>
Please login to merge, or discard this patch.
public/old/editeventtype.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 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
 
Please login to merge, or discard this patch.
public/old/pendingAccounts.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,24 +30,24 @@
 block discarded – undo
30 30
     switch ($_POST['action']) {
31 31
     case 'approve':
32 32
       $userId = approvePendingUser($id);
33
-      mailNewUser($userId);
34
-      header('Location: addUser.php?action=edit&user='.$userId);
35
-      break;
33
+        mailNewUser($userId);
34
+        header('Location: addUser.php?action=edit&user='.$userId);
35
+        break;
36 36
     case 'merge':
37 37
       $existingUserId = $_POST['existingUser'];
38
-      $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
-      mergePendingUserWithUserId($id, $existingUserId);
40
-      mailNewUser($existingUserId);
41
-      header('Location: addUser.php?action=edit&user='.$existingUserId);
42
-      break;
38
+        $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
+        mergePendingUserWithUserId($id, $existingUserId);
40
+        mailNewUser($existingUserId);
41
+        header('Location: addUser.php?action=edit&user='.$existingUserId);
42
+        break;
43 43
     case 'decline':
44 44
       declinePendingUser($id);
45
-      break;
45
+        break;
46 46
 
47 47
     default:
48 48
       // code...
49 49
       break;
50
-  }
50
+    }
51 51
 }
52 52
 
53 53
 if (empty($id)) {
Please login to merge, or discard this patch.
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -28,25 +28,25 @@
 block discarded – undo
28 28
     $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT);
29 29
 
30 30
     switch ($_POST['action']) {
31
-    case 'approve':
32
-      $userId = approvePendingUser($id);
33
-      mailNewUser($userId);
34
-      header('Location: addUser.php?action=edit&user='.$userId);
35
-      break;
36
-    case 'merge':
37
-      $existingUserId = $_POST['existingUser'];
38
-      $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
-      mergePendingUserWithUserId($id, $existingUserId);
40
-      mailNewUser($existingUserId);
41
-      header('Location: addUser.php?action=edit&user='.$existingUserId);
42
-      break;
43
-    case 'decline':
44
-      declinePendingUser($id);
45
-      break;
46
-
47
-    default:
48
-      // code...
49
-      break;
31
+        case 'approve':
32
+          $userId = approvePendingUser($id);
33
+          mailNewUser($userId);
34
+          header('Location: addUser.php?action=edit&user='.$userId);
35
+          break;
36
+        case 'merge':
37
+          $existingUserId = $_POST['existingUser'];
38
+          $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
+          mergePendingUserWithUserId($id, $existingUserId);
40
+          mailNewUser($existingUserId);
41
+          header('Location: addUser.php?action=edit&user='.$existingUserId);
42
+          break;
43
+        case 'decline':
44
+          declinePendingUser($id);
45
+          break;
46
+
47
+        default:
48
+          // code...
49
+          break;
50 50
   }
51 51
 }
52 52
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 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
 
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
     case 'approve':
32 32
       $userId = approvePendingUser($id);
33 33
       mailNewUser($userId);
34
-      header('Location: addUser.php?action=edit&user='.$userId);
34
+      header('Location: addUser.php?action=edit&user=' . $userId);
35 35
       break;
36 36
     case 'merge':
37 37
       $existingUserId = $_POST['existingUser'];
38 38
       $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39 39
       mergePendingUserWithUserId($id, $existingUserId);
40 40
       mailNewUser($existingUserId);
41
-      header('Location: addUser.php?action=edit&user='.$existingUserId);
41
+      header('Location: addUser.php?action=edit&user=' . $existingUserId);
42 42
       break;
43 43
     case 'decline':
44 44
       declinePendingUser($id);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 <div class="box box-primary">
91 91
   <div class="box-header">
92 92
     <h2 class="box-title">
93
-      <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName.' '.$user->lastName ?>
93
+      <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName . ' ' . $user->lastName ?>
94 94
     </h2>
95 95
   </div>
96 96
   <div class="box-body">
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             <?php
132 132
             $users = allUsersNames();
133 133
             foreach ($users as $existingUser): ?>
134
-            <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName.' '.$existingUser->lastName ?></option>
134
+            <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName . ' ' . $existingUser->lastName ?></option>
135 135
             <?php endforeach; ?>
136 136
           </select>
137 137
         </div>
Please login to merge, or discard this patch.
public/old/settings.php 1 patch
Spacing   +3 added lines, -3 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
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		skin='$skin'";
166 166
 
167 167
     if (!mysqli_query(db(), $sql)) {
168
-        die('Error: '.mysqli_error(db()));
168
+        die('Error: ' . mysqli_error(db()));
169 169
     }
170 170
     header('Location: settings.php');
171 171
 }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	<!-- Content Header (Page header) -->
193 193
 	<section class="content-header">
194 194
 		<h1>Settings
195
-			<?php echo '<small>v'.$row['version'].'</small>'; ?>
195
+			<?php echo '<small>v' . $row['version'] . '</small>'; ?>
196 196
 		</h1>
197 197
 		<ol class="breadcrumb">
198 198
 			<li><a href="<?php echo siteSettings()->getSiteUrl() ?>"><i class="fa fa-dashboard"></i> Home</a></li>
Please login to merge, or discard this patch.
public/old/install.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 } catch (\Exception $e) {
35 35
 }
36 36
 
37
-$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
37
+$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
38 38
 $url = substr($url, 0, -12); // remove "/install.php" from url
39 39
 
40 40
 if ($_SERVER['REQUEST_METHOD'] == 'POST') {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         //exit;
49 49
         $conn->exec($sql);
50 50
     } catch (\Exception $e) {
51
-        echo 'Error (code: '.$e->getCode().') adding tables to database: '.$e->getMessage();
51
+        echo 'Error (code: ' . $e->getCode() . ') adding tables to database: ' . $e->getMessage();
52 52
         exit;
53 53
     }
54 54
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     $lastname = $_POST['lastname'];
59 59
     $lastname = trim(strip_tags($lastname));
60 60
 
61
-    $username = strtolower($firstname).'.'.strtolower($lastname);
61
+    $username = strtolower($firstname) . '.' . strtolower($lastname);
62 62
 
63 63
     $password = $_POST['password'];
64 64
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     try {
83 83
         $user->save();
84 84
     } catch (\Exception $e) {
85
-        echo 'Error (code: '.$e->getCode().') adding user to database: '.$e->getMessage();
85
+        echo 'Error (code: ' . $e->getCode() . ') adding user to database: ' . $e->getMessage();
86 86
         exit;
87 87
     }
88 88
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
     $settings->save();
181 181
 
182
-    header('Location: login.php?username='.$username); // Move to the home page of the admin section
182
+    header('Location: login.php?username=' . $username); // Move to the home page of the admin section
183 183
     exit;
184 184
 }
185 185
 
Please login to merge, or discard this patch.