From 6827341932fcd3b63886a19ee8119ba89570bf20 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2020 01:48:21 +0000 Subject: [PATCH 1/2] Bump guzzlehttp/psr7 from 1.6.1 to 1.7.0 Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 1.6.1 to 1.7.0. - [Release notes](https://github.com/guzzle/psr7/releases) - [Changelog](https://github.com/guzzle/psr7/blob/1.7.0/CHANGELOG.md) - [Commits](https://github.com/guzzle/psr7/compare/1.6.1...1.7.0) Signed-off-by: dependabot-preview[bot] --- composer.lock | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index d1e3cdc..619b222 100644 --- a/composer.lock +++ b/composer.lock @@ -471,16 +471,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", "shasum": "" }, "require": { @@ -493,15 +493,15 @@ }, "require-dev": { "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -538,7 +538,7 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "time": "2020-09-30T07:37:11+00:00" }, { "name": "mailgun/mailgun-php", @@ -3656,6 +3656,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2019-09-17T06:23:10+00:00" }, { @@ -4553,5 +4554,6 @@ "platform-dev": [], "platform-overrides": { "php": "7.1.0" - } + }, + "plugin-api-version": "1.1.0" } From b3f62573792c3ff8ebcdcf9c59d454d72209b386 Mon Sep 17 00:00:00 2001 From: Christopher Wilkinson Date: Thu, 1 Oct 2020 01:48:30 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI --- generated-classes/TechWilk/Rota/User.php | 4 +- generated-conf/config.php | 44 ++++----- .../PropelMigration_1494860053.php | 8 +- public/api/v1/index.php | 84 ++++++++-------- public/old/cr_daily.php | 2 +- public/old/createEvent.php | 48 +++++----- public/old/editRole.php | 12 +-- public/old/editeventtype.php | 16 ++-- public/old/emailEvent.php | 10 +- public/old/emailGroup.php | 10 +- public/old/emails.php | 6 +- public/old/includes/config.php | 4 +- public/old/includes/footer.php | 8 +- public/old/includes/functions.auth.php | 4 +- public/old/includes/functions.calendars.php | 6 +- public/old/includes/functions.database.php | 16 ++-- public/old/includes/functions.discussion.php | 4 +- public/old/includes/functions.event.php | 36 +++---- public/old/includes/functions.facebook.php | 8 +- public/old/includes/functions.mail.php | 80 ++++++++-------- .../old/includes/functions.notifications.php | 34 +++---- public/old/includes/functions.php | 6 +- public/old/includes/functions.remove.php | 30 +++--- public/old/includes/functions.roles.php | 24 ++--- public/old/includes/functions.users.php | 66 ++++++------- public/old/includes/header.php | 29 +++--- public/old/license.php | 2 +- public/old/linkSocialAuth.php | 14 +-- public/old/locations.php | 6 +- public/old/overview.php | 8 +- public/old/pendingAccounts.php | 14 +-- .../samples/old/assets/posteddata.php | 6 +- public/old/recordingUpload.php | 17 ++-- public/old/roles.php | 8 +- public/old/series.php | 10 +- public/old/settings.php | 32 +++---- public/old/statistics.php | 16 ++-- public/old/subTypes.php | 4 +- public/old/swap.php | 36 +++---- public/old/swaps.php | 16 ++-- public/old/tableView.php | 12 +-- .../samples/old/assets/posteddata.php | 6 +- src/classes/Controller/InstallController.php | 5 +- tests/Integration/BaseTestCase.php | 96 +++++++++---------- tests/Unit/BaseTestCase.php | 30 +++--- tests/Unit/CryptTest.php | 40 ++++---- tests/Unit/EmailAddressTest.php | 14 +-- 47 files changed, 498 insertions(+), 493 deletions(-) diff --git a/generated-classes/TechWilk/Rota/User.php b/generated-classes/TechWilk/Rota/User.php index 8ec997a..b797483 100644 --- a/generated-classes/TechWilk/Rota/User.php +++ b/generated-classes/TechWilk/Rota/User.php @@ -70,8 +70,8 @@ public function setPassword($v) if (!password_verify($v, $this->password)) { $bcrypt_options = [ - 'cost' => 12, - ]; + 'cost' => 12, + ]; $this->password = password_hash($v, PASSWORD_BCRYPT, $bcrypt_options); $this->modifiedColumns[UserTableMap::COL_PASSWORD] = true; diff --git a/generated-conf/config.php b/generated-conf/config.php index 1195e3a..dd115f7 100644 --- a/generated-conf/config.php +++ b/generated-conf/config.php @@ -7,18 +7,18 @@ $serviceContainer->setAdapterClass('default', 'mysql'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration([ - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', - 'dsn' => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'], - 'user' => $config['db']['user'], - 'password' => $config['db']['pass'], - 'attributes' => [ - 'ATTR_EMULATE_PREPARES' => false, - 'ATTR_TIMEOUT' => 30, - ], - 'model_paths' => [ - 0 => 'src', - 1 => 'vendor', - ], + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', + 'dsn' => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'], + 'user' => $config['db']['user'], + 'password' => $config['db']['pass'], + 'attributes' => [ + 'ATTR_EMULATE_PREPARES' => false, + 'ATTR_TIMEOUT' => 30, + ], + 'model_paths' => [ + 0 => 'src', + 1 => 'vendor', + ], ]); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); @@ -26,16 +26,16 @@ $serviceContainer->setAdapterClass('test', 'sqlite'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration([ - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', - 'dsn' => 'sqlite:/var/tmp/test.db', - 'attributes' => [ - 'ATTR_EMULATE_PREPARES' => false, - 'ATTR_TIMEOUT' => 30, - ], - 'model_paths' => [ - 0 => 'src', - 1 => 'vendor', - ], + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', + 'dsn' => 'sqlite:/var/tmp/test.db', + 'attributes' => [ + 'ATTR_EMULATE_PREPARES' => false, + 'ATTR_TIMEOUT' => 30, + ], + 'model_paths' => [ + 0 => 'src', + 1 => 'vendor', + ], ]); $manager->setName('test'); $serviceContainer->setConnectionManager('test', $manager); diff --git a/generated-migrations/PropelMigration_1494860053.php b/generated-migrations/PropelMigration_1494860053.php index 468dd15..9bfeb5c 100644 --- a/generated-migrations/PropelMigration_1494860053.php +++ b/generated-migrations/PropelMigration_1494860053.php @@ -40,7 +40,7 @@ public function postDown(MigrationManager $manager) public function getUpSQL() { return [ - 'default' => ' + 'default' => ' # This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; @@ -160,7 +160,7 @@ public function getUpSQL() # This restores the fkey checks, after having unset them earlier SET FOREIGN_KEY_CHECKS = 1; ', -]; + ]; } /** @@ -172,7 +172,7 @@ public function getUpSQL() public function getDownSQL() { return [ - 'default' => ' + 'default' => ' # This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; @@ -270,6 +270,6 @@ public function getDownSQL() # This restores the fkey checks, after having unset them earlier SET FOREIGN_KEY_CHECKS = 1; ', -]; + ]; } } diff --git a/public/api/v1/index.php b/public/api/v1/index.php index 5fe8861..978cbd1 100644 --- a/public/api/v1/index.php +++ b/public/api/v1/index.php @@ -17,68 +17,66 @@ function isAdmin() } } -if (isAdmin()): +if (isAdmin()) { // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Start of API -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Start of API + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -require_once __DIR__.'/../../../vendor/autoload.php'; + require_once __DIR__.'/../../../vendor/autoload.php'; -require_once __DIR__.'/../../../generated-conf/config.php'; + require_once __DIR__.'/../../../generated-conf/config.php'; -// Create and configure Slim app -$app = new \Slim\App(['settings' => $config]); + // Create and configure Slim app + $app = new \Slim\App(['settings' => $config]); -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Containers for DI -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Containers for DI + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -$container = $app->getContainer(); + $container = $app->getContainer(); -$container['db'] = function ($c) { - $db_config = $c['settings']['db']; - $db = new Database($db_config); + $container['db'] = function ($c) { + $db_config = $c['settings']['db']; + $db = new Database($db_config); - return $db; -}; + return $db; + }; -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Define app routes -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Define app routes + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// ~~~~~~~~~~~~~~~ Series ~~~~~~~~~~~~~~~ + // ~~~~~~~~~~~~~~~ Series ~~~~~~~~~~~~~~~ -$app->post('/series', function ($request, $response, $args) { - $postData = $request->getParsedBody(); + $app->post('/series', function ($request, $response, $args) { + $postData = $request->getParsedBody(); - $name = filter_var($postData['name'], FILTER_SANITIZE_STRING); - $description = filter_var($postData['description'], FILTER_SANITIZE_STRING); + $name = filter_var($postData['name'], FILTER_SANITIZE_STRING); + $description = filter_var($postData['description'], FILTER_SANITIZE_STRING); - $series = new EventGroup(); - $series->setName($name); - $series->setDescription($description); - $series->save(); + $series = new EventGroup(); + $series->setName($name); + $series->setDescription($description); + $series->save(); - $data = [ - 'data' => [ - 'id' => $series->getId(), - 'name' => $series->getName(), - 'description' => $series->getDescription(), - ], + $data = [ + 'data' => [ + 'id' => $series->getId(), + 'name' => $series->getName(), + 'description' => $series->getDescription(), + ], ]; - return $response->withJson($data); -}); + return $response->withJson($data); + }); -// Run app -$app->run(); + // Run app + $app->run(); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // End of very very very basic auth // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -else: -http_response_code(401); - -endif; +} else { + http_response_code(401); +} diff --git a/public/old/cr_daily.php b/public/old/cr_daily.php index 68d95f0..c1f5e5d 100755 --- a/public/old/cr_daily.php +++ b/public/old/cr_daily.php @@ -117,7 +117,7 @@ date >= CURDATE() AND date_format( date , "%y-%m-%d" ) <= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert.' DAY ) , "%y-%m-%d" )'; - $resultEvents = mysqli_query(db(), $sqlEvents) or die(mysqli_error(db())); + $resultEvents = mysqli_query(db(), $sqlEvents) or exit(mysqli_error(db())); $i = 0; while ($rowEvents = mysqli_fetch_array($resultEvents, MYSQLI_ASSOC)) { $usersNotified = notifyEveryoneForEvent($rowEvents['id']); diff --git a/public/old/createEvent.php b/public/old/createEvent.php index 0ed4b2d..39f7afa 100755 --- a/public/old/createEvent.php +++ b/public/old/createEvent.php @@ -69,7 +69,7 @@ (SELECT name FROM eventSubTypes WHERE eventSubTypes.id = events.subType) AS subtypename, (SELECT name FROM eventGroups WHERE eventGroups.id = events.eventGroup) AS groupname FROM events WHERE id = '$eventID'"; - $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); + $result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { if ($action == 'edit') { @@ -145,11 +145,11 @@ if ($action == 'edit') { $sql = "UPDATE events SET date = '$date', rehearsalDate = '$rehersalDate', location = '$location', rehearsal = '$norehearsal', type = '$type', subType = '$subType', name = '$eventName', eventGroup = '$eventGroup', sermonTitle = '$sermonTitle', bibleVerse = '$bibleVerse' WHERE id = '$id'"; - mysqli_query(db(), $sql) or die(mysqli_error(db())); + mysqli_query(db(), $sql) or exit(mysqli_error(db())); } else { $sql = "INSERT INTO events (date, createdBy, rehearsalDate, type, subType, location, rehearsal, name, eventGroup, sermonTitle, bibleVerse) VALUES ('$date', '$sessionUserID','$rehersalDate', '$type', '$subType', '$location', '$norehearsal', '$eventName', '$eventGroup', '$sermonTitle', '$bibleVerse')"; - mysqli_query(db(), $sql) or die(mysqli_error(db())); + mysqli_query(db(), $sql) or exit(mysqli_error(db())); $id = mysqli_insert_id(db()); $eventID = mysqli_insert_id(db()); } @@ -172,7 +172,7 @@ //if ($userisBandAdmin) $sql = $sql . " AND userRoleId IN (SELECT id FROM userRoles WHERE groupid IN (2,3,4))"; //if ($userisEventEditor) $sql = $sql . " AND userRoleId IN (SELECT id FROM userRoles WHERE NOT (groupid IN (2,3,4)))"; - $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); + $result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { // We're going to put it all in a nice array called membersArray @@ -214,7 +214,7 @@ if ($userisEventEditor) { $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where not (groupid in (2,3,4)))'; } - mysqli_query(db(), $delete_all_sql) or die(mysqli_error(db())); + mysqli_query(db(), $delete_all_sql) or exit(mysqli_error(db())); } // redirect @@ -295,7 +295,7 @@ } ?> id == $type)) { $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime)); @@ -320,7 +320,7 @@ } ?> "> joinWith('Group.Role')->joinWith('Role.UserRole')->find(); - foreach ($groups as $group): ?> + foreach ($groups as $group) { ?> getName() ?> - getRoles() as $role): ?> + getRoles() as $role) { ?>
- + - + - +
- +
- 0): ?> - + 0) { ?> +
- - + +
diff --git a/public/old/emailGroup.php b/public/old/emailGroup.php index 58eee33..42c68f2 100644 --- a/public/old/emailGroup.php +++ b/public/old/emailGroup.php @@ -74,7 +74,7 @@ INNER JOIN userRoles ur ON ur.roleId = r.id GROUP BY g.id'; -$result = mysqli_query(db(), $sql) or die(mysqli_error(db())); +$result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); while ($ob = mysqli_fetch_object($result)) { $groups[] = $ob; } @@ -110,13 +110,13 @@

Send to

- 0): ?> - + 0) { ?> +
- - + +
diff --git a/public/old/emails.php b/public/old/emails.php index d8c8b5a..eefc1cf 100755 --- a/public/old/emails.php +++ b/public/old/emails.php @@ -71,7 +71,7 @@ if ($editskillID != '') { $sql = ("INSERT INTO eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')"); if (!mysqli_query(db(), $sql)) { - die('Error: '.mysqli_error(db())); + exit('Error: '.mysqli_error(db())); } // After we have inserted the data, we want to head back to the main page @@ -81,14 +81,14 @@ if ($editbandID != '') { $sqlbandMembers = "SELECT * FROM bandMembers WHERE bandID = '$editbandID'"; - $resultbandMembers = mysqli_query(db(), $sqlbandMembers) or die(mysqli_error(db())); + $resultbandMembers = mysqli_query(db(), $sqlbandMembers) or exit(mysqli_error(db())); while ($bandMember = mysqli_fetch_array($resultbandMembers, MYSQLI_ASSOC)) { $editskillID = $bandMember['skillID']; $sql = ("INSERT INTO eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')"); if (!mysqli_query(db(), $sql)) { - die('Error: '.mysqli_error(db())); + exit('Error: '.mysqli_error(db())); } } diff --git a/public/old/includes/config.php b/public/old/includes/config.php index b9efcc9..b217b2e 100644 --- a/public/old/includes/config.php +++ b/public/old/includes/config.php @@ -17,10 +17,10 @@ } // Connect to the database server -$dbh = @mysqli_connect($config['db']['host'], $config['db']['user'], $config['db']['pass']) or die('Connection to '.$config['db']['host']." with login '".$config['db']['user']."'/'$pwdMasked' failed."); +$dbh = @mysqli_connect($config['db']['host'], $config['db']['user'], $config['db']['pass']) or exit('Connection to '.$config['db']['host']." with login '".$config['db']['user']."'/'$pwdMasked' failed."); // Choose the right database -$db = @mysqli_select_db($dbh, $config['db']['dbname']) or die("Connection made, but database '".$config['db']['dbname']."' was not found."); +$db = @mysqli_select_db($dbh, $config['db']['dbname']) or exit("Connection made, but database '".$config['db']['dbname']."' was not found."); // allow config to be fetched in functions diff --git a/public/old/includes/footer.php b/public/old/includes/footer.php index 621c8d9..9fa5ab2 100755 --- a/public/old/includes/footer.php +++ b/public/old/includes/footer.php @@ -21,7 +21,7 @@ along with Church Rota. If not, see . */ -?> +?>
@@ -118,9 +118,11 @@ - + - + seen == false) { $unseen += 1; } - } - ?> + } ?>
  • @@ -357,12 +356,12 @@ */ - if (isset($_SESSION['userid'])): ?> + if (isset($_SESSION['userid'])) { ?> - +
  • @@ -470,7 +469,7 @@ WHERE date >= DATE(NOW()) AND events.removed = 0) ORDER BY name'; - $result = mysqli_query(db(), $filter_sql) or die(mysqli_error(db())); + $result = mysqli_query(db(), $filter_sql) or exit(mysqli_error(db())); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { ?> @@ -486,11 +485,11 @@
  • > View All
  • - +
  • > Add Event
  • - + > Settings - +
  • >Login
  • - + diff --git a/public/old/license.php b/public/old/license.php index b024522..389e310 100755 --- a/public/old/license.php +++ b/public/old/license.php @@ -22,7 +22,7 @@ You should have received a copy of the GNU General Public License along with Church Rota. If not, see . */ -include 'includes/header.php'; ?> +include 'includes/header.php'; ?>

    License

                        GNU GENERAL PUBLIC LICENSE
    diff --git a/public/old/linkSocialAuth.php b/public/old/linkSocialAuth.php index c97c2dc..ac5face 100644 --- a/public/old/linkSocialAuth.php +++ b/public/old/linkSocialAuth.php @@ -88,37 +88,37 @@
    - +

    Social login has not been enabled.

    Speak with your site administrator if you think this feature should be enabled.

    - + - +

    - +
    - +
    - +
    - +

    - +
    @@ -116,9 +116,9 @@ '.$sentSuccess.'
    '; - endif; + } ?> diff --git a/public/old/pendingAccounts.php b/public/old/pendingAccounts.php index c5f4524..3533dda 100644 --- a/public/old/pendingAccounts.php +++ b/public/old/pendingAccounts.php @@ -59,7 +59,7 @@ // setup page $sql = "SELECT socialId, firstName, lastName, email, approved, declined, source FROM pendingUsers WHERE id = $id"; -$result = mysqli_query(db(), $sql) or die(mysqli_error(db())); +$result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); $user = mysqli_fetch_object($result); if (!($user->approved == true || $user->declined == true)) { @@ -102,7 +102,7 @@

    Source: source ?>

    - + - + - +

    Merge with existing user

    @@ -132,9 +132,9 @@
    @@ -143,6 +143,6 @@ - + diff --git a/public/old/plugins/ckeditor/samples/old/assets/posteddata.php b/public/old/plugins/ckeditor/samples/old/assets/posteddata.php index 2d7e01f..dfb57de 100755 --- a/public/old/plugins/ckeditor/samples/old/assets/posteddata.php +++ b/public/old/plugins/ckeditor/samples/old/assets/posteddata.php @@ -4,7 +4,7 @@ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -?> +?> @@ -35,7 +35,7 @@ $value = htmlspecialchars(stripslashes((string) $value)); } else { $value = htmlspecialchars((string) $value); - } ?> + } ?>
    @@ -43,7 +43,7 @@ +?> - 0): ?> + 0) { ?> - +
    @@ -232,7 +232,7 @@ $whereAnd = 'r.id = '.$role->roleId; } $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'; - $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); + $result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { ?> @@ -248,11 +248,11 @@
    - + - 0): ?> + 0) { ?> - +
    @@ -271,16 +271,16 @@
    - + - +

    There are no roles in the event you are skilled to cover.

    If you need adding to the rota, speak to an admin.

    - + diff --git a/public/old/swaps.php b/public/old/swaps.php index 9426c8d..aca9d19 100644 --- a/public/old/swaps.php +++ b/public/old/swaps.php @@ -79,7 +79,7 @@
    - + getEventPerson()->getEvent() ?>
    @@ -105,20 +105,20 @@ $canAcceptSwap = canAcceptSwap($swap->getId()); $canDeclineSwap = canDeclineSwap($swap->getId()); ?> - + - +
    - +
    diff --git a/public/old/tableView.php b/public/old/tableView.php index 9a7eaa5..573612e 100755 --- a/public/old/tableView.php +++ b/public/old/tableView.php @@ -58,7 +58,7 @@ $sqlSettings = 'SELECT * FROM settings'; - $resultSettings = mysqli_query(db(), $sqlSettings) or die(mysqli_error(db())); + $resultSettings = mysqli_query(db(), $sqlSettings) or exit(mysqli_error(db())); $rowSettings = mysqli_fetch_array($resultSettings, MYSQLI_ASSOC); $lang_locale = $rowSettings['lang_locale']; $time_format_short = $rowSettings['time_format_short']; @@ -83,7 +83,7 @@ } $sql = 'SELECT count(*) AS colcount FROM groups g'; - $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); + $result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); $row = mysqli_fetch_array($result, MYSQLI_ASSOC); $colCnt = $row['colcount'] + 2; @@ -116,7 +116,7 @@ WHERE '.$whereTwoMonth.' AND e.removed = 0) ORDER BY name'; - $result = mysqli_query(db(), $filter_sql) or die(mysqli_error(db())); + $result = mysqli_query(db(), $filter_sql) or exit(mysqli_error(db())); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { ?> @@ -135,7 +135,7 @@ Event '; @@ -179,7 +179,7 @@ e.date'; } - $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); + $result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $eventID = $row['id']; $preacher = ''; @@ -234,7 +234,7 @@ for ($i = 0; $i < count($categoryID); $i++) { $peopleInEvent = false; echo ''; - $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db())); + $resultPeople = mysqli_query(db(), $sqlPeople) or exit(mysqli_error(db())); $previousName = ''; while ($viewPeople = mysqli_fetch_array($resultPeople, MYSQLI_ASSOC)) { $groupID = $viewPeople['groupId']; diff --git a/public/plugins/ckeditor/samples/old/assets/posteddata.php b/public/plugins/ckeditor/samples/old/assets/posteddata.php index 2d7e01f..dfb57de 100755 --- a/public/plugins/ckeditor/samples/old/assets/posteddata.php +++ b/public/plugins/ckeditor/samples/old/assets/posteddata.php @@ -4,7 +4,7 @@ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -?> +?> @@ -35,7 +35,7 @@ $value = htmlspecialchars(stripslashes((string) $value)); } else { $value = htmlspecialchars((string) $value); - } ?> + } ?>
    @@ -43,7 +43,7 @@ +?>