@@ -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; |
@@ -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; |
@@ -19,11 +19,11 @@ |
||
| 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(); |
@@ -7,18 +7,18 @@ discard block |
||
| 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 |
||
| 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); |