Skip to content

Commit 1d2778e

Browse files
committed
PHP 8 updates - installation script fixes
1 parent 0fa866c commit 1d2778e

8 files changed

Lines changed: 3777 additions & 3568 deletions

File tree

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.19.1

DEVELOPMENT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ up in your browser, but now we've finally added a proper build process.
1313
### Local development
1414

1515
With 3.0.14 Form Tools source code was moved to a `src/` folder in the repo and all build artifacts are generated
16-
into a `dist/` folder.
16+
into a `dist/` folder.
1717

18-
After checking out the repo run these commands.
18+
After checking out the repo run these commands.
1919

2020
```
2121
yarn install
@@ -92,4 +92,4 @@ and create a tag with the name specified.
9292
Please note:
9393
- the main `global/Core.class.php` should have been updated with the correct version.
9494

95-
At that point we can just generate the new release from the `releases` branch via github as before.
95+
At that point we can just generate the new release from the `releases` branch via github as before.

gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const fs = require('fs');
22
const path = require('path');
33
const lineByLine = require('n-readlines');
4-
const sass = require('node-sass');
4+
const sass = require('sass');
55
const pkg = require('./package.json');
66
const child_process = require('child_process');
77

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@
112112
"mini-css-extract-plugin": "^0.8.0",
113113
"moment": "^2.22.2",
114114
"n-readlines": "^1.0.0",
115-
"node-sass": "^4.12.0",
116115
"postcss-loader": "^3.0.0",
117116
"prop-types": "^15.6.1",
118117
"reselect": "^3.0.1",
119118
"resolve-url-loader": "^3.1.0",
119+
"sass": "1.58.3",
120120
"sass-loader": "^7.2.0",
121121
"sinon": "^7.5.0",
122122
"style-loader": "^1.0.0",

src/global/code/Emails.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public static function sendTestEmail($info)
301301
$email_id = Sessions::get("email_id");
302302
$submission_id = (isset($info["submission_id"]) && !empty($info["submission_id"])) ? $info["submission_id"] : "";
303303

304-
list ($success, $email_info) = self::getEmailComponents($form_id, $submission_id, $email_id, true, $info);
304+
list ($success, $email_info) = self::getEmailComponents($form_id, $email_id, $submission_id, true, $info);
305305
if (!$success) {
306306
return array(false, $email_info);
307307
}
@@ -386,7 +386,7 @@ public static function sendTestEmail($info)
386386
* @param integer $email_id
387387
* @return array
388388
*/
389-
public static function getEmailComponents($form_id, $submission_id = "", $email_id, $is_test = false, $test_settings = array())
389+
public static function getEmailComponents($form_id, $email_id, $submission_id = "", $is_test = false, $test_settings = array())
390390
{
391391
$LANG = Core::$L;
392392
$root_dir = Core::getRootDir();
@@ -1282,7 +1282,7 @@ public static function sendEmails($event, $form_id, $submission_id)
12821282
*/
12831283
public static function processEmailTemplate($form_id, $submission_id, $email_id)
12841284
{
1285-
list($success, $email_components) = self::getEmailComponents($form_id, $submission_id, $email_id);
1285+
list($success, $email_components) = self::getEmailComponents($form_id, $email_id, $submission_id);
12861286

12871287
if (!$success) {
12881288
return array(false, "Email components not returned properly (Emails::getEmailComponents).");

src/global/code/FieldTypes.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ public static function getFieldTypeProcessingInfo()
710710
* @param $field_ids
711711
* @return array a hash of [field_id][identifier] = values
712712
*/
713-
public static function getFormFieldFieldTypeSettings($field_ids = array(), $form_fields)
713+
public static function getFormFieldFieldTypeSettings($field_ids = array(), $form_fields = array())
714714
{
715715
$db = Core::$db;
716716

@@ -1439,7 +1439,7 @@ public static function get($return_settings = false, $field_type_ids = array())
14391439
SELECT *, g.list_order as group_list_order, ft.list_order as field_type_list_order
14401440
FROM {PREFIX}field_types ft, {PREFIX}list_groups g
14411441
WHERE g.group_type = :field_types AND
1442-
ft.group_id = g.group_id AND
1442+
ft.group_id = g.group_id AND
14431443
ft.field_type_id IN ($field_type_id_str)
14441444
ORDER BY g.list_order, ft.list_order
14451445
");
@@ -1534,7 +1534,7 @@ public static function addFieldTypeSettingOptions($options)
15341534
{
15351535
$db = Core::$db;
15361536

1537-
$query = "INSERT INTO {PREFIX}field_type_setting_options (setting_id, option_text, option_value, option_order,
1537+
$query = "INSERT INTO {PREFIX}field_type_setting_options (setting_id, option_text, option_value, option_order,
15381538
is_new_sort_group) VALUES (:setting_id, :option_text, :option_value, :option_order, :is_new_sort_group)";
15391539

15401540
foreach ($options as $option) {
@@ -1558,7 +1558,7 @@ public static function deleteFieldTypeSettingsByFieldTypeId($field_type_id)
15581558
$db->query("
15591559
SELECT setting_id
15601560
FROM {PREFIX}field_type_settings
1561-
WHERE field_type_id = :field_type_id
1561+
WHERE field_type_id = :field_type_id
15621562
");
15631563
$db->bind("field_type_id", $field_type_id);
15641564
$db->execute();
@@ -1878,7 +1878,7 @@ public static function resetFieldTypeSettings ($field_type_data)
18781878
// here, this is a new setting added to the field type that the users installation doesn't have
18791879
if ($found_setting === null) {
18801880
$db->query("
1881-
INSERT INTO {PREFIX}field_type_settings (field_label, field_type, field_orientation, default_value_type,
1881+
INSERT INTO {PREFIX}field_type_settings (field_label, field_type, field_orientation, default_value_type,
18821882
default_value, list_order)
18831883
VALUES (:field_label, :field_type, :field_orientation, :default_value_type, :default_value, :list_order)
18841884
");

src/global/code/actions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
case "display_test_email":
172172
$form_id = Sessions::get("form_id");
173173
$email_id = Sessions::get("email_id");
174-
$info = Emails::getEmailComponents($form_id, "", $email_id, true, $request);
174+
$info = Emails::getEmailComponents($form_id, $email_id, "", true, $request);
175175
echo returnJSON($info);
176176
break;
177177

0 commit comments

Comments
 (0)