Completed
Pull Request — master (#140)
by Christopher
02:40
created
public/old/swap.php 2 patches
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,21 +64,21 @@  discard block
 block discarded – undo
64 64
   case 'accept':
65 65
     if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
66 66
         switch (acceptSwap($swapId)) {
67
-        case '1':
68
-          $message = 'Swap Successful';
69
-          break;
70
-        case '2':
71
-          $message = 'Swap already accepted.';
72
-          break;
73
-        case '3':
74
-          $message = 'Swap already declined.';
75
-          break;
76
-        case '4':
77
-          $message = 'Swap already reverted.';
78
-          break;
79
-        default:
80
-          $err = 'Technical issue - please inform system administrator';
81
-          break;
67
+            case '1':
68
+              $message = 'Swap Successful';
69
+              break;
70
+            case '2':
71
+              $message = 'Swap already accepted.';
72
+              break;
73
+            case '3':
74
+              $message = 'Swap already declined.';
75
+              break;
76
+            case '4':
77
+              $message = 'Swap already reverted.';
78
+              break;
79
+            default:
80
+              $err = 'Technical issue - please inform system administrator';
81
+              break;
82 82
       }
83 83
     } else {
84 84
         $err = 'Swap Already Actioned or Verification Code Invalid';
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
   case 'decline':
88 88
     if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
89 89
         switch (declineSwap($swapId)) {
90
-        case '1':
91
-          $message = 'Swap declined';
92
-          break;
93
-        case '2':
94
-          $message = 'Swap already declined.';
95
-          break;
96
-        default:
97
-          $err = 'Technical issue - please inform system administrator';
98
-          break;
90
+            case '1':
91
+              $message = 'Swap declined';
92
+              break;
93
+            case '2':
94
+              $message = 'Swap already declined.';
95
+              break;
96
+            default:
97
+              $err = 'Technical issue - please inform system administrator';
98
+              break;
99 99
         }
100 100
     } else {
101 101
         $err = 'Swap Already Actioned or Verification Code Invalid';
Please login to merge, or discard this 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.
public/old/subTypes.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@
 block discarded – undo
53 53
     }
54 54
 
55 55
     // After we have inserted the data, we want to head back to the main users page
56
-     header('Location: subTypes.php'); // Move to the home page of the admin section
57
-      exit;
56
+        header('Location: subTypes.php'); // Move to the home page of the admin section
57
+        exit;
58 58
 }
59 59
 include 'includes/header.php';
60 60
 ?>
Please login to merge, or discard this patch.
public/old/recordingUpload.php 1 patch
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.
public/old/pendingAccounts.php 2 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.
public/old/includes/functions.discussion.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         '#(http://(www.)?youtube.com)?/(v/|watch\?v\=)([-|~_0-9A-Za-z]+)&?.*?#i',
47 47
         '<iframe title="YouTube Video" width="560" height="340" src="http://www.youtube.com/embed/$4" frameborder="0" allowfullscreen></iframe>',
48 48
     $string
49
-  );
49
+    );
50 50
 
51 51
     return $string;
52 52
 }
Please login to merge, or discard this patch.
public/old/includes/functions.notifications.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     7 => 'swap-pending',
16 16
     8 => 'swap-approved',
17 17
     9 => 'email',
18
-  ];
18
+    ];
19 19
 }
20 20
 
21 21
 function createNotificationForUser($userId, $summary, $body, $typeName, $link = null)
Please login to merge, or discard this patch.
public/old/email.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     case 'everyone':
52 52
       echo '<p>Function not complete, please wait while we finish writing it.</p><p>Apologies for any inconvinence.</p>';
53 53
         break;
54
-  default:
54
+    default:
55 55
     echo '<p>Error: Insufficient parameters.</p>';
56 56
     echo '<p>Please inform the system administrator</p>';
57 57
     break;
Please login to merge, or discard this patch.
public/old/linkSocialAuth.php 2 patches
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -37,22 +37,22 @@
 block discarded – undo
37 37
     $platform = strtolower($_POST['platform']);
38 38
 
39 39
     switch ($_POST['action']) {
40
-    case 'link':
41
-      switch ($platform) {
40
+        case 'link':
41
+          switch ($platform) {
42 42
         case 'facebook':
43 43
           $_SESSION['fb-callback-url'] = 'fb-link.php';
44 44
           header('Location: fb-login.php');
45 45
           exit;
46
-      }
47
-      break;
48
-    case 'unlink':
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;
52
-
53
-    default:
54
-      // code...
46
+          }
55 47
       break;
48
+        case 'unlink':
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;
52
+
53
+        default:
54
+          // code...
55
+          break;
56 56
   }
57 57
 }
58 58
 
Please login to merge, or discard this 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.
generated-migrations/PropelMigration_1494860053.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function getUpSQL()
41 41
     {
42 42
         return [
43
-  'default' => '
43
+    'default' => '
44 44
 # This is a fix for InnoDB in MySQL >= 4.1.x
45 45
 # It "suspends judgement" for fkey relationships until are tables are set.
46 46
 SET FOREIGN_KEY_CHECKS = 0;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     public function getDownSQL()
173 173
     {
174 174
         return [
175
-  'default' => '
175
+    'default' => '
176 176
 # This is a fix for InnoDB in MySQL >= 4.1.x
177 177
 # It "suspends judgement" for fkey relationships until are tables are set.
178 178
 SET FOREIGN_KEY_CHECKS = 0;
Please login to merge, or discard this patch.