Completed
Push — master ( 47fcc2...df93ac )
by Christopher
16s
created
generated-classes/TechWilk/Rota/Group.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
     {
20 20
         return EventQuery::create()
21 21
             ->useEventPersonQuery()
22
-              ->useUserRoleQuery()
22
+                ->useUserRoleQuery()
23 23
                 ->useRoleQuery()
24
-                  ->filterByGroup($this)
24
+                    ->filterByGroup($this)
25
+                ->endUse()
25 26
                 ->endUse()
26
-              ->endUse()
27 27
             ->endUse()
28 28
             ->orderByDate('desc')
29 29
             ->findOne();
Please login to merge, or discard this patch.
generated-conf/config.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
 $serviceContainer->setAdapterClass('default', 'mysql');
8 8
 $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
9 9
 $manager->setConfiguration([
10
-  'classname'  => 'Propel\\Runtime\\Connection\\ConnectionWrapper',
11
-  'dsn'        => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'],
12
-  'user'       => $config['db']['user'],
13
-  'password'   => $config['db']['pass'],
14
-  'attributes' => [
10
+    'classname'  => 'Propel\\Runtime\\Connection\\ConnectionWrapper',
11
+    'dsn'        => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'],
12
+    'user'       => $config['db']['user'],
13
+    'password'   => $config['db']['pass'],
14
+    'attributes' => [
15 15
     'ATTR_EMULATE_PREPARES' => false,
16 16
     'ATTR_TIMEOUT'          => 30,
17
-  ],
18
-  'model_paths' => [
17
+    ],
18
+    'model_paths' => [
19 19
     0 => 'src',
20 20
     1 => 'vendor',
21
-  ],
21
+    ],
22 22
 ]);
23 23
 $manager->setName('default');
24 24
 $serviceContainer->setConnectionManager('default', $manager);
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
 $serviceContainer->setAdapterClass('test', 'sqlite');
27 27
 $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
28 28
 $manager->setConfiguration([
29
-  'classname'  => 'Propel\\Runtime\\Connection\\ConnectionWrapper',
30
-  'dsn'        => 'sqlite:/var/tmp/test.db',
31
-  'attributes' => [
29
+    'classname'  => 'Propel\\Runtime\\Connection\\ConnectionWrapper',
30
+    'dsn'        => 'sqlite:/var/tmp/test.db',
31
+    'attributes' => [
32 32
     'ATTR_EMULATE_PREPARES' => false,
33 33
     'ATTR_TIMEOUT'          => 30,
34
-  ],
35
-  'model_paths' => [
34
+    ],
35
+    'model_paths' => [
36 36
     0 => 'src',
37 37
     1 => 'vendor',
38
-  ],
38
+    ],
39 39
 ]);
40 40
 $manager->setName('test');
41 41
 $serviceContainer->setConnectionManager('test', $manager);
Please login to merge, or discard this patch.
api-classes/Person.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
         $currentTimestamp = $date = strftime('%F %T', time());
29 29
 
30 30
         $data = [
31
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
32
-      ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
33
-      ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
34
-      ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
35
-      ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()],
36
-      ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
37
-      ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
31
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
32
+        ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
33
+        ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
34
+        ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
35
+        ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()],
36
+        ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
37
+        ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
38 38
     ];
39 39
 
40 40
         if (isset($this->notes)) {
Please login to merge, or discard this patch.
api-classes/Type.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
         }
21 21
 
22 22
         $data = [
23
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
-      ['field' => 'description', 'type' => 'string', 'value' => $this->description],
23
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
+        ['field' => 'description', 'type' => 'string', 'value' => $this->description],
25 25
     ];
26 26
 
27 27
         $db->insert($this->db_table, $data);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         $whereCondition = 'id = '.$id;
41 41
         $where = [
42
-      $whereCondition,
42
+        $whereCondition,
43 43
     ];
44 44
 
45 45
         if ($db->delete($this->db_table, $where)) {
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
         }
60 60
 
61 61
         $columns = [
62
-      'id',
63
-      'name',
64
-      'description',
62
+        'id',
63
+        'name',
64
+        'description',
65 65
     ];
66 66
 
67 67
         $whereCondition = 'id = '.$id;
68 68
         $where = [
69
-      $whereCondition,
69
+        $whereCondition,
70 70
     ];
71 71
 
72 72
         $result = $db->selectSingle('Type', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
api-classes/SubType.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
         }
21 21
 
22 22
         $data = [
23
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
-      ['field' => 'description', 'type' => 'string', 'value' => $this->description],
23
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
+        ['field' => 'description', 'type' => 'string', 'value' => $this->description],
25 25
     ];
26 26
 
27 27
         $db->insert($this->db_table, $data);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $whereCondition = 'id = '.$id;
44 44
         $where = [
45
-      $whereCondition,
45
+        $whereCondition,
46 46
     ];
47 47
 
48 48
         if ($db->delete($this->db_table, $where)) {
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         $columns = [
65
-      'id',
66
-      'name',
67
-      'description',
65
+        'id',
66
+        'name',
67
+        'description',
68 68
     ];
69 69
 
70 70
         $whereCondition = 'id = '.$id;
71 71
         $where = [
72
-      $whereCondition,
72
+        $whereCondition,
73 73
     ];
74 74
 
75 75
         $result = $db->selectSingle('SubType', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
api-classes/Location.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
         }
21 21
 
22 22
         $data = [
23
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
-      ['field' => 'address', 'type' => 'string', 'value' => $this->address],
23
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
+        ['field' => 'address', 'type' => 'string', 'value' => $this->address],
25 25
     ];
26 26
 
27 27
         $db->insert($this->db_table, $data);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         $whereCondition = 'id = '.$id;
41 41
         $where = [
42
-      $whereCondition,
42
+        $whereCondition,
43 43
     ];
44 44
 
45 45
         if ($db->delete($this->db_table, $where)) {
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
         }
60 60
 
61 61
         $columns = [
62
-      'id',
63
-      'name',
64
-      'address',
62
+        'id',
63
+        'name',
64
+        'address',
65 65
     ];
66 66
 
67 67
         $whereCondition = 'id = '.$id;
68 68
         $where = [
69
-      $whereCondition,
69
+        $whereCondition,
70 70
     ];
71 71
 
72 72
         $result = $db->selectSingle('Location', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
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/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.