Completed
Pull Request — master (#140)
by Christopher
05:12
created
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/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.
public/old/locations.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         // After we have inserted the data, we want to head back to the main users page
57
-     header('Location: locations.php'); // Move to the home page of the admin section
58
-      exit;
57
+        header('Location: locations.php'); // Move to the home page of the admin section
58
+        exit;
59 59
     }
60 60
 }
61 61
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 	</form>
122 122
 </div><!-- /.box -->
123 123
   <?php
124
-  if (isAdmin()) {
125
-      ?>
124
+    if (isAdmin()) {
125
+        ?>
126 126
   <div id="right">
127 127
   		<div class="item"><a href="settings.php">Back to settings</a></div>
128 128
 <?php
129
-  } ?>
129
+    } ?>
130 130
 <?php include 'includes/footer.php'; ?>
Please login to merge, or discard this patch.
generated-classes/TechWilk/Rota/User.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         if (!password_verify($v, $this->password)) {
35 35
             $bcrypt_options = [
36 36
         'cost' => 12,
37
-      ];
37
+        ];
38 38
             $this->password = password_hash($v, PASSWORD_BCRYPT, $bcrypt_options);
39 39
 
40 40
             $this->modifiedColumns[UserTableMap::COL_PASSWORD] = true;
Please login to merge, or discard this patch.
public/old/statistics.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -139,12 +139,12 @@
 block discarded – undo
139 139
     		<tbody>
140 140
     		<?php
141 141
                 $sql = "SELECT s.date,s.detail1,s.detail2,s.detail3,s.type,trim(concat(u.firstName,' ',u.lastName)) AS name FROM statistics s INNER JOIN users u ON u.id = s.userid";
142
-          if (!isAdmin()) {
143
-              $sql .= 'WHERE u.ID=s.userID';
144
-              if (!$debug) {
145
-                  $sql .= " AND s.type = 'system'";
146
-              }
147
-          }
142
+            if (!isAdmin()) {
143
+                $sql .= 'WHERE u.ID=s.userID';
144
+                if (!$debug) {
145
+                    $sql .= " AND s.type = 'system'";
146
+                }
147
+            }
148 148
                 $sql .= ' ORDER BY date desc '.$limit;
149 149
                 $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
150 150
                 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
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 users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN 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 users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN 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.