new version
This commit is contained in:
@@ -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' ) ) {
|
||||
die();
|
||||
|
||||
@@ -3145,12 +3145,6 @@ abstract class GFAddOn {
|
||||
|
||||
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 );
|
||||
$is_applicable_input_type = empty( $args['input_types'] ) || in_array( $input_type, $args['input_types'] );
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
0
includes/class-gf-background-upgrader.php
Normal file → Executable file
0
includes/class-gf-background-upgrader.php
Normal file → Executable 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.
|
||||
*/
|
||||
|
||||
/** WordPress Upgrade Functions */
|
||||
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
||||
|
||||
class GF_Upgrade {
|
||||
|
||||
private $versions = null;
|
||||
|
||||
@@ -93,8 +93,8 @@ class GF_Field_CAPTCHA extends GF_Field {
|
||||
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
|
||||
$response_token = sanitize_text_field( rgpost( 'g-recaptcha-response' ) );
|
||||
$hash = sanitize_text_field( rgpost( 'gf-recaptcha-response-hash' ) );
|
||||
$response_token = rgpost( 'g-recaptcha-response' );
|
||||
$hash = rgpost( 'gf-recaptcha-response-hash' );
|
||||
|
||||
if( GFFormDisplay::is_last_page( $form ) && $hash && wp_hash( $response_token ) === $hash ) {
|
||||
$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>";
|
||||
|
||||
$recaptcha_response = sanitize_text_field( rgpost( 'g-recaptcha-response' ) );
|
||||
$recaptcha_response = rgpost( 'g-recaptcha-response' );
|
||||
$current_page = GFFormDisplay::get_current_page( $form['id'] );
|
||||
|
||||
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 ) {
|
||||
$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='gf-recaptcha-response-hash' value='{$hash}'>";
|
||||
|
||||
|
||||
0
includes/libraries/gf-background-process.php
Normal file → Executable file
0
includes/libraries/gf-background-process.php
Normal file → Executable file
0
includes/libraries/wp-async-request.php
Normal file → Executable file
0
includes/libraries/wp-async-request.php
Normal file → Executable file
0
includes/phpqrcode/LICENSE
Normal file → Executable file
0
includes/phpqrcode/LICENSE
Normal file → Executable file
0
includes/phpqrcode/phpqrcode.php
Normal file → Executable file
0
includes/phpqrcode/phpqrcode.php
Normal file → Executable 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(
|
||||
new self(
|
||||
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 ) )
|
||||
|| ( $this->operator == self::EQ && $this->right->value == '' )
|
||||
) {
|
||||
if ( in_array( $this->operator, array( self::NIN, self::NBETWEEN, self::NEQ ) ) && ! empty( $this->right ) ) {
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
$subquery = $wpdb->prepare( sprintf( "SELECT 1 FROM `%s` WHERE `meta_key` = %%s AND `entry_id` = `%s`.`id`",
|
||||
|
||||
@@ -261,7 +261,6 @@ class GF_System_Report {
|
||||
* @uses GFUpgrade::upgrade()
|
||||
*/
|
||||
private static function maybe_process_action() {
|
||||
global $wpdb;
|
||||
|
||||
switch ( rgpost( 'gf_action' ) ) {
|
||||
|
||||
@@ -272,7 +271,7 @@ class GF_System_Report {
|
||||
|
||||
$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' );
|
||||
|
||||
|
||||
0
includes/system-status/js/clipboard.min.js
vendored
Normal file → Executable file
0
includes/system-status/js/clipboard.min.js
vendored
Normal file → Executable file
0
includes/templates/edit-shortcode-form.tpl.php
Normal file → Executable file
0
includes/templates/edit-shortcode-form.tpl.php
Normal file → Executable file
@@ -439,7 +439,7 @@ if ( class_exists( 'GFForms' ) ) {
|
||||
$authentication_required = apply_filters( 'gform_webapi_authentication_required_' . $endpoint, $authentication_required );
|
||||
|
||||
if ( $authentication_required ) {
|
||||
// $this->authenticate();
|
||||
$this->authenticate();
|
||||
} else {
|
||||
$this->log_debug( __METHOD__ . '(): Authentication not required.' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user