@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $location = $event->getLocation(); |
83 | 83 | |
84 | 84 | $data = [ |
85 | - 'data' => [ |
|
85 | + 'data' => [ |
|
86 | 86 | 'id' => $event->getId(), |
87 | 87 | 'name' => $event->name, |
88 | 88 | 'date' => $event->datetime, |
@@ -95,8 +95,8 @@ discard block |
||
95 | 95 | 'related' => '/events/'.$event->getId().'/series/'.$series->getId(), |
96 | 96 | ], |
97 | 97 | 'data' => [ |
98 | - 'type' => 'series', |
|
99 | - 'id' => $series->getId(), |
|
98 | + 'type' => 'series', |
|
99 | + 'id' => $series->getId(), |
|
100 | 100 | ], |
101 | 101 | ], |
102 | 102 | 'types' => [ |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | 'related' => '/events/'.$event->getId().'/types/'.$type->getId(), |
106 | 106 | ], |
107 | 107 | 'data' => [ |
108 | - 'type' => 'types', |
|
109 | - 'id' => $type->getId(), |
|
108 | + 'type' => 'types', |
|
109 | + 'id' => $type->getId(), |
|
110 | 110 | ], |
111 | 111 | ], |
112 | 112 | 'sub-types' => [ |
@@ -130,56 +130,56 @@ discard block |
||
130 | 130 | ], |
131 | 131 | ], |
132 | 132 | ], |
133 | - ], |
|
134 | - 'included' => [ |
|
135 | - [ |
|
133 | + ], |
|
134 | + 'included' => [ |
|
135 | + [ |
|
136 | 136 | 'type' => 'series', |
137 | 137 | 'id' => $series->getId(), |
138 | 138 | 'attributes' => [ |
139 | - 'name' => $series->name, |
|
140 | - 'description' => $series->description, |
|
139 | + 'name' => $series->name, |
|
140 | + 'description' => $series->description, |
|
141 | 141 | ], |
142 | 142 | 'links' => [ |
143 | 143 | 'self' => '/series/'.$series->getId(), |
144 | 144 | ], |
145 | - ], |
|
146 | - [ |
|
145 | + ], |
|
146 | + [ |
|
147 | 147 | 'type' => 'types', |
148 | 148 | 'id' => $type->getId(), |
149 | 149 | 'attributes' => [ |
150 | - 'name' => $type->name, |
|
151 | - 'description' => $type->description, |
|
150 | + 'name' => $type->name, |
|
151 | + 'description' => $type->description, |
|
152 | 152 | ], |
153 | 153 | 'links' => [ |
154 | 154 | 'self' => '/types/'.$type->getId(), |
155 | 155 | ], |
156 | - ], |
|
157 | - [ |
|
156 | + ], |
|
157 | + [ |
|
158 | 158 | 'type' => 'sub-types', |
159 | 159 | 'id' => $sub_type->getId(), |
160 | 160 | 'attributes' => [ |
161 | - 'name' => $sub_type->name, |
|
162 | - 'description' => $sub_type->description, |
|
161 | + 'name' => $sub_type->name, |
|
162 | + 'description' => $sub_type->description, |
|
163 | 163 | ], |
164 | 164 | 'links' => [ |
165 | 165 | 'self' => '/sub-types/'.$sub_type->getId(), |
166 | 166 | ], |
167 | - ], |
|
168 | - [ |
|
167 | + ], |
|
168 | + [ |
|
169 | 169 | 'type' => 'locations', |
170 | 170 | 'id' => $location->getId(), |
171 | 171 | 'attributes' => [ |
172 | - 'name' => $location->name, |
|
172 | + 'name' => $location->name, |
|
173 | 173 | ], |
174 | 174 | 'links' => [ |
175 | 175 | 'self' => '/locations/'.$location->getId(), |
176 | 176 | ], |
177 | - ], |
|
178 | - ], |
|
179 | - 'meta' => [ |
|
177 | + ], |
|
178 | + ], |
|
179 | + 'meta' => [ |
|
180 | 180 | 'status' => '200', |
181 | - ], |
|
182 | - ]; |
|
181 | + ], |
|
182 | + ]; |
|
183 | 183 | |
184 | 184 | return $response->withJson($data, 200); |
185 | 185 | }); |
@@ -199,12 +199,12 @@ discard block |
||
199 | 199 | $series->createInDb($this->db); |
200 | 200 | |
201 | 201 | $data = [ |
202 | - 'data' => [ |
|
202 | + 'data' => [ |
|
203 | 203 | 'id' => $series->getId(), |
204 | 204 | 'name' => $series->name, |
205 | 205 | 'description' => $series->description, |
206 | 206 | ], |
207 | - ]; |
|
207 | + ]; |
|
208 | 208 | |
209 | 209 | return $response->withJson($data); |
210 | 210 | }); |
@@ -216,12 +216,12 @@ discard block |
||
216 | 216 | $series->getFromDbWithId($this->db, $id); |
217 | 217 | |
218 | 218 | $data = [ |
219 | - 'data' => [ |
|
219 | + 'data' => [ |
|
220 | 220 | 'id' => $series->getId(), |
221 | 221 | 'name' => $series->name, |
222 | 222 | 'description' => $series->description, |
223 | 223 | ], |
224 | - ]; |
|
224 | + ]; |
|
225 | 225 | |
226 | 226 | return $response->withJson($data); |
227 | 227 | }); |
@@ -233,11 +233,11 @@ discard block |
||
233 | 233 | $series->deleteFromDbWithId($this->db, $id); |
234 | 234 | |
235 | 235 | $data = [ |
236 | - 'data' => [ |
|
236 | + 'data' => [ |
|
237 | 237 | 'id' => $series->getId(), |
238 | 238 | 'archived' => true, |
239 | 239 | ], |
240 | - ]; |
|
240 | + ]; |
|
241 | 241 | |
242 | 242 | return $response->withJson($data); |
243 | 243 | }); |
@@ -257,12 +257,12 @@ discard block |
||
257 | 257 | $type->createInDb($this->db); |
258 | 258 | |
259 | 259 | $data = [ |
260 | - 'data' => [ |
|
260 | + 'data' => [ |
|
261 | 261 | 'id' => $type->getId(), |
262 | 262 | 'name' => $type->name, |
263 | 263 | 'description' => $type->description, |
264 | 264 | ], |
265 | - ]; |
|
265 | + ]; |
|
266 | 266 | |
267 | 267 | return $response->withJson($data); |
268 | 268 | }); |
@@ -274,12 +274,12 @@ discard block |
||
274 | 274 | $type->getFromDbWithId($this->db, $id); |
275 | 275 | |
276 | 276 | $data = [ |
277 | - 'data' => [ |
|
277 | + 'data' => [ |
|
278 | 278 | 'id' => $type->getId(), |
279 | 279 | 'name' => $type->name, |
280 | 280 | 'description' => $type->description, |
281 | 281 | ], |
282 | - ]; |
|
282 | + ]; |
|
283 | 283 | |
284 | 284 | return $response->withJson($data); |
285 | 285 | }); |
@@ -291,11 +291,11 @@ discard block |
||
291 | 291 | $type->deleteFromDbWithId($this->db, $id); |
292 | 292 | |
293 | 293 | $data = [ |
294 | - 'data' => [ |
|
294 | + 'data' => [ |
|
295 | 295 | 'id' => $type->getId(), |
296 | 296 | 'archived' => true, |
297 | 297 | ], |
298 | - ]; |
|
298 | + ]; |
|
299 | 299 | |
300 | 300 | return $response->withJson($data); |
301 | 301 | }); |
@@ -315,12 +315,12 @@ discard block |
||
315 | 315 | $type->createInDb($this->db); |
316 | 316 | |
317 | 317 | $data = [ |
318 | - 'data' => [ |
|
318 | + 'data' => [ |
|
319 | 319 | 'id' => $type->getId(), |
320 | 320 | 'name' => $type->name, |
321 | 321 | 'description' => $type->description, |
322 | 322 | ], |
323 | - ]; |
|
323 | + ]; |
|
324 | 324 | |
325 | 325 | return $response->withJson($data); |
326 | 326 | }); |
@@ -332,12 +332,12 @@ discard block |
||
332 | 332 | $type->getFromDbWithId($this->db, $id); |
333 | 333 | |
334 | 334 | $data = [ |
335 | - 'data' => [ |
|
335 | + 'data' => [ |
|
336 | 336 | 'id' => $type->getId(), |
337 | 337 | 'name' => $type->name, |
338 | 338 | 'description' => $type->description, |
339 | 339 | ], |
340 | - ]; |
|
340 | + ]; |
|
341 | 341 | |
342 | 342 | return $response->withJson($data); |
343 | 343 | }); |
@@ -349,11 +349,11 @@ discard block |
||
349 | 349 | $type->deleteFromDbWithId($this->db, $id); |
350 | 350 | |
351 | 351 | $data = [ |
352 | - 'data' => [ |
|
352 | + 'data' => [ |
|
353 | 353 | 'id' => $type->getId(), |
354 | 354 | 'archived' => true, |
355 | 355 | ], |
356 | - ]; |
|
356 | + ]; |
|
357 | 357 | |
358 | 358 | return $response->withJson($data); |
359 | 359 | }); |
@@ -371,11 +371,11 @@ discard block |
||
371 | 371 | $type->createInDb($this->db); |
372 | 372 | |
373 | 373 | $data = [ |
374 | - 'data' => [ |
|
374 | + 'data' => [ |
|
375 | 375 | 'id' => $location->getId(), |
376 | 376 | 'name' => $location->name, |
377 | 377 | ], |
378 | - ]; |
|
378 | + ]; |
|
379 | 379 | |
380 | 380 | return $response->withJson($data); |
381 | 381 | }); |
@@ -387,11 +387,11 @@ discard block |
||
387 | 387 | $location->getFromDbWithId($this->db, $id); |
388 | 388 | |
389 | 389 | $data = [ |
390 | - 'data' => [ |
|
390 | + 'data' => [ |
|
391 | 391 | 'id' => $location->getId(), |
392 | 392 | 'name' => $location->name, |
393 | 393 | ], |
394 | - ]; |
|
394 | + ]; |
|
395 | 395 | |
396 | 396 | return $response->withJson($data); |
397 | 397 | }); |
@@ -403,11 +403,11 @@ discard block |
||
403 | 403 | $location->deleteFromDbWithId($this->db, $id); |
404 | 404 | |
405 | 405 | $data = [ |
406 | - 'data' => [ |
|
406 | + 'data' => [ |
|
407 | 407 | 'id' => $location->getId(), |
408 | 408 | 'archived' => true, |
409 | 409 | ], |
410 | - ]; |
|
410 | + ]; |
|
411 | 411 | |
412 | 412 | return $response->withJson($data); |
413 | 413 | }); |
@@ -53,8 +53,8 @@ |
||
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 | ?> |
@@ -34,11 +34,11 @@ discard block |
||
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 |
||
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>'; |
@@ -30,24 +30,24 @@ |
||
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)) { |
@@ -46,7 +46,7 @@ |
||
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 | } |
@@ -15,7 +15,7 @@ |
||
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) |
@@ -51,7 +51,7 @@ |
||
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; |
@@ -5,18 +5,18 @@ |
||
5 | 5 | include 'includes/config.php'; |
6 | 6 | include 'includes/functions.php'; |
7 | 7 | |
8 | - // you have to open the session first |
|
9 | - session_start(); |
|
8 | + // you have to open the session first |
|
9 | + session_start(); |
|
10 | 10 | |
11 | 11 | //if ($debug) notifyInfo(__FILE__,"logout",$_SESSION['userid']); //only_for_testing// |
12 | 12 | if ($debug) { |
13 | 13 | insertStatistics('user', __FILE__, 'logout'); |
14 | 14 | } |
15 | 15 | |
16 | - //remove all the variables in the session |
|
17 | - session_unset(); |
|
16 | + //remove all the variables in the session |
|
17 | + session_unset(); |
|
18 | 18 | |
19 | - // destroy the session |
|
20 | - session_destroy(); |
|
19 | + // destroy the session |
|
20 | + session_destroy(); |
|
21 | 21 | |
22 | - header('Location: login.php'); |
|
22 | + header('Location: login.php'); |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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; |