Completed
Push — master ( 4f2f75...b03ed7 )
by Christopher
06:52 queued 15s
created
api-classes/Series.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         $data = [
39
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
40
-      ['field' => 'description', 'type' => 'string', 'value' => $this->description],
39
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
40
+        ['field' => 'description', 'type' => 'string', 'value' => $this->description],
41 41
     ];
42 42
 
43 43
         $db->insert($this->db_table, $data);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         $whereCondition = 'id = '.$id;
57 57
         $where = [
58
-      $whereCondition,
58
+        $whereCondition,
59 59
     ];
60 60
 
61 61
         if ($db->delete($this->db_table, $where)) {
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         $columns = [
78
-      'id',
79
-      'name',
80
-      'description',
78
+        'id',
79
+        'name',
80
+        'description',
81 81
     ];
82 82
 
83 83
         $whereCondition = 'id = '.$id;
84 84
         $where = [
85
-      $whereCondition,
85
+        $whereCondition,
86 86
     ];
87 87
 
88 88
         $result = $db->selectSingle('Series', $this->db_table, $columns, $where);
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         $columns = [
108
-      'id',
109
-      'name',
110
-      'description',
108
+        'id',
109
+        'name',
110
+        'description',
111 111
     ];
112 112
 
113 113
         $whereCondition = 'name = '.$db->addQuotes($name);
114 114
         $where = [
115
-      $whereCondition,
115
+        $whereCondition,
116 116
     ];
117 117
 
118 118
         $result = $db->selectSingle('Series', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
public/old/swap.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $swapId = filter_var($swapId, FILTER_SANITIZE_NUMBER_INT);
48 48
 
49 49
 switch ($action) {
50
-  case 'swap':
50
+    case 'swap':
51 51
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
52 52
         $eventPersonId = $_POST['eventPerson'];
53 53
         $newUserRoleId = $_POST['newUserRole'];
@@ -61,48 +61,48 @@  discard block
 block discarded – undo
61 61
         $err = 'Swap details incorrect, please try again.';
62 62
     }
63 63
     break;
64
-  case 'accept':
64
+    case 'accept':
65 65
     if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
66 66
         switch (acceptSwap($swapId)) {
67 67
         case '1':
68 68
           $message = 'Swap Successful';
69
-          break;
69
+            break;
70 70
         case '2':
71 71
           $message = 'Swap already accepted.';
72
-          break;
72
+            break;
73 73
         case '3':
74 74
           $message = 'Swap already declined.';
75
-          break;
75
+            break;
76 76
         case '4':
77 77
           $message = 'Swap already reverted.';
78
-          break;
78
+            break;
79 79
         default:
80 80
           $err = 'Technical issue - please inform system administrator';
81
-          break;
82
-      }
81
+            break;
82
+        }
83 83
     } else {
84 84
         $err = 'Swap Already Actioned or Verification Code Invalid';
85 85
     }
86 86
     break;
87
-  case 'decline':
87
+    case 'decline':
88 88
     if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
89 89
         switch (declineSwap($swapId)) {
90 90
         case '1':
91 91
           $message = 'Swap declined';
92
-          break;
92
+            break;
93 93
         case '2':
94 94
           $message = 'Swap already declined.';
95
-          break;
95
+            break;
96 96
         default:
97 97
           $err = 'Technical issue - please inform system administrator';
98
-          break;
98
+            break;
99 99
         }
100 100
     } else {
101 101
         $err = 'Swap Already Actioned or Verification Code Invalid';
102 102
     }
103 103
     break;
104 104
 
105
-  default:
105
+    default:
106 106
     // code...
107 107
     break;
108 108
 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		<section class="content">
164 164
       
165 165
       <?php
166
-      if (isset($message)): ?>
166
+        if (isset($message)): ?>
167 167
       
168 168
         <p><?php echo $message ?></p>
169 169
 
@@ -224,19 +224,19 @@  discard block
 block discarded – undo
224 224
                 <label for="newUserRole">Swap To:</label>
225 225
                 <select name="newUserRole" class="form-control">
226 226
                   <?php
227
-                  if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
-                      $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
-                  } else {
230
-                      $whereAnd = 'r.id = '.$role->roleId;
231
-                  }
232
-                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM cr_users u INNER JOIN cr_userRoles ur ON ur.userId = u.id INNER JOIN cr_roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
-                  $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
-
235
-                  while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
-                      ?>
227
+                    if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
+                        $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
+                    } else {
230
+                        $whereAnd = 'r.id = '.$role->roleId;
231
+                    }
232
+                    $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM cr_users u INNER JOIN cr_userRoles ur ON ur.userId = u.id INNER JOIN cr_roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
+                    $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
+
235
+                    while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
+                        ?>
237 237
                     <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'].' '.$row['lastName'].' ('.$row['name'].')'; ?></option>
238 238
                   <?php
239
-                  } ?>
239
+                    } ?>
240 240
                 </select>
241 241
               </div>
242 242
             </div>
Please login to merge, or discard this patch.
public/old/calendar.php 1 patch
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.
public/old/fb-link.php 1 patch
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.
public/old/linkSocialAuth.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,19 +41,19 @@
 block discarded – undo
41 41
       switch ($platform) {
42 42
         case 'facebook':
43 43
           $_SESSION['fb-callback-url'] = 'fb-link.php';
44
-          header('Location: fb-login.php');
45
-          exit;
46
-      }
47
-      break;
44
+            header('Location: fb-login.php');
45
+            exit;
46
+        }
47
+        break;
48 48
     case 'unlink':
49 49
       removeSocialAuthFromUserWithId($id, $platform);
50
-      createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
51
-      break;
50
+        createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account.  Login via Facebook is now disabled for your account.  Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php');
51
+        break;
52 52
 
53 53
     default:
54 54
       // code...
55 55
       break;
56
-  }
56
+    }
57 57
 }
58 58
 
59 59
 // list of possible social account links (names used as platform names in database)
Please login to merge, or discard this patch.
public/old/includes/functions.facebook.php 1 patch
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.
public/old/addUser.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 // If the form has been submitted, then we need to handle the data.
85 85
 if ($_SERVER['REQUEST_METHOD'] == 'POST') {
86 86
 
87
-  // sanitise inputs
87
+    // sanitise inputs
88 88
     if (isAdmin()) {
89 89
         $firstname = $_POST['firstname'];
90 90
         $firstname = strip_tags($firstname);
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
           <div class="box-body">
258 258
 
259 259
     			<?php
260
-          // if isAdmin() == false
261
-          // ordered in this way to build the page with contact details before permissions
260
+            // if isAdmin() == false
261
+            // ordered in this way to build the page with contact details before permissions
262 262
                 if (!isAdmin()) {
263 263
                     if ($userId == $sessionUserID) {
264 264
                         echo $firstname.' '.$lastname;
@@ -304,15 +304,15 @@  discard block
 block discarded – undo
304 304
 
305 305
 					<?php
306 306
 
307
-          if (isAdmin()) {
308
-              ?>
307
+            if (isAdmin()) {
308
+                ?>
309 309
 
310 310
           <div class="checkbox">
311 311
       			<label for="isAdmin">
312 312
               <input name="isAdmin" id="isAdmin" type="checkbox" value="1" <?php if ($userisAdmin == '1') {
313
-                  echo 'checked="checked"';
314
-              } elseif ($userisAdmin == '0') {
315
-              } ?> />
313
+                    echo 'checked="checked"';
314
+                } elseif ($userisAdmin == '0') {
315
+                } ?> />
316 316
               Make them an ADMIN?:
317 317
             </label>
318 318
           </div>
@@ -320,9 +320,9 @@  discard block
 block discarded – undo
320 320
           <div class="checkbox">
321 321
       			<label for="isBandAdmin">
322 322
               <input class="checkbox" name="isBandAdmin" id="isBandAdmin" type="checkbox" value="1" <?php if ($userisBandAdmin == '1') {
323
-                  echo 'checked="checked"';
324
-              } elseif ($userisBandAdmin == '0') {
325
-              } ?> />
323
+                    echo 'checked="checked"';
324
+                } elseif ($userisBandAdmin == '0') {
325
+                } ?> />
326 326
               Make them a BAND admin?:
327 327
             </label>
328 328
           </div>
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
           <div class="checkbox">
331 331
       			<label for="isEventEditor">
332 332
         			<input class="checkbox" name="isEventEditor" id="isEventEditor" type="checkbox" value="1" <?php if ($userIsEventEditor == '1') {
333
-                  echo 'checked="checked"';
334
-              } elseif ($userIsEventEditor == '0') {
335
-              } ?> />
333
+                    echo 'checked="checked"';
334
+                } elseif ($userIsEventEditor == '0') {
335
+                } ?> />
336 336
               Make them an EVENT EDITOR?:
337 337
             </label>
338 338
           </div>
@@ -340,14 +340,14 @@  discard block
 block discarded – undo
340 340
 					<hr />
341 341
 
342 342
 					<?php
343
-          } ?>
343
+            } ?>
344 344
 
345 345
           <div class="checkbox">
346 346
       			<label for="isOverviewRecipient">
347 347
         			<input class="checkbox" <?php echo isAdmin() ? '' : 'disabled="disabled"' ?> name="isOverviewRecipient" id="isOverviewRecipient" type="checkbox" value="1" <?php if ($userIsOverviewRecipient == '1' || is_null($userIsOverviewRecipient)) {
348
-              echo 'checked="checked"';
349
-          } elseif ($userIsOverviewRecipient == '0') {
350
-          }?> />
348
+                echo 'checked="checked"';
349
+            } elseif ($userIsOverviewRecipient == '0') {
350
+            }?> />
351 351
               Receive group emails?:
352 352
             </label>
353 353
           </div>
@@ -355,9 +355,9 @@  discard block
 block discarded – undo
355 355
 					<div class="checkbox">
356 356
       			<label for="isReminderRecipient">
357 357
         			<input class="checkbox" disabled= "disabled" name="isReminderRecipient" id="isReminderRecipient" type="checkbox" value="1" <?php if (true/*$userIsReminderRecipient == '1' || is_null($userIsReminderRecipient)*/) {
358
-              echo 'checked="checked"';
359
-          } elseif (true/*$userIsReminderRecipient*/ == '0') {
360
-          }?> />
358
+                echo 'checked="checked"';
359
+            } elseif (true/*$userIsReminderRecipient*/ == '0') {
360
+            }?> />
361 361
               Receive email reminders?: (optional in future update to system)
362 362
             </label>
363 363
           </div>
@@ -447,18 +447,18 @@  discard block
 block discarded – undo
447 447
                 } else {
448 448
                     echo '<input class="btn btn-primary" type="submit" value="Add user" />';
449 449
                 }
450
-         ?>
450
+            ?>
451 451
 		</div><!-- /.box-footer -->
452 452
   	</form>
453 453
   </div>
454 454
 </div>
455 455
 <div id="right">
456 456
 <?php if (isAdmin()) {
457
-             ?>
457
+                ?>
458 458
 
459 459
 		<div class="item"><a class="btn" href="users.php">View all users</a></div>
460 460
 		<?php
461
-         }
461
+            }
462 462
 
463 463
             if ($action == 'edit') {
464 464
                 ?>
Please login to merge, or discard this patch.
public/old/fb-signup.php 1 patch
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.
public/old/series.php 1 patch
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.