Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

Commit

Permalink
Manual update from 1.9.1.6 to 1.9.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Feb 26, 2015
1 parent a392b3a commit 2e12f61
Show file tree
Hide file tree
Showing 38 changed files with 1,742 additions and 1,623 deletions.
97 changes: 78 additions & 19 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,88 @@
-------------------------------------------------------------------------------------------------------------------
Version 1.9.1.6
- Added 'svg-painter' to list of no conflict scripts
- Updated GFForms::get_admin_icon_b64() method to support a $color parameter for fetching the SVG icon in different colors
Version 1.9.2
- Added the disabled attribute to the datepicker input in the form editor.
- Added support for the field placeholder as an available choice in the conditional logic value drop down.
- Added self-healing security precautions.
- Added security precautions.
- Added THE BEST FIX EVER for on-going IE issues with the datepicker
- Added security precautions to updates.
- Added the gform_upload_root_htaccess_rules filter to allow the .htaccess file rules to be removed or modified. Please consult your system administrator before using this filter. Example:
add_filter( 'gform_upload_root_htaccess_rules', '__return_false' );
- Added extra CSS classes for name field to help in styling them.
- Added the gform_enable_shortcode_notification_message hook back, allowing shortcode processing of notification messages to be disabled.
- Added context to some strings to allow a better translation.
- Added 'svg-painter' to list of no conflict scripts.
- Updated the field type drop down on the Custom Field in the form editor to use optgroup for the standard fields and the advanced fields option headers.
- Updated the gform_address_display_format filter to also have access to the $field.
add_filter( 'gform_address_display_format', function ( $format, $field ) {
return $field->form_id == 40 ? 'zip_before_city' : $format;
}, 10, 2 );
- Updated Payment Add-On Framework cron job schedule to hourly instead of daily.
- Updated Masked Input script to latest version.
- Updated Finnish translation file.
- Updated small fix to French translation.
- Updated Spanish (es_ES) translation.
- Updated GFForms::get_admin_icon_b64() method to support a $color parameter for fetching the SVG icon in different colors.
$white_icon = GFForms::get_admin_icon_b64( '#fff' );

-------------------------------------------------------------------------------------------------------------------
Version 1.9.1.5
- Fixed an issue in the form editor in Chrome for Windows where the conditional logic dependency confirmation pops up multiple times while editing a field with a dependency.
- Fixed issue with multi file upload field when applied to a post custom field.
- Fixed the loading of the Add Form button for custom admin pages using the gform_display_add_form_button filter.
- Fixed a deprecation notice related to the Captcha field when the Really Simple Captcha plugin is active.
- Fixed a JavaScript error on the WordPress edit attachment details page.
- Fixed a string in Spanish translation that caused a JS error in the entries list.
- Fixed a rare fatal error which would occur if a third-party plugin caused wp_mail() to return a WP_Error instance instead of the expected boolean.
- Fixed issue with GFFormDisplay::is_last_page() where "render" mode would return a false positive if validation failed
- Fixed issue when aggregating conditional logic default values for selects when no price is set on the selected choice
- Fixed issue with special characters on password field.
- Fixed inconsistency between GFForms::post() and rgpost() functions.
- Fixed issue with email validation when confirmation email is active.
- Fixed an issue which prevents List field columns from being sorted in the form editor.
- Fixed an issue with the multi-file field on the edit entry page where existing files are lost when adding new files.
- Fixed an issue with the Post Tags field in the form editor where the Default Value setting is missing.
- Fixed a rare fatal error on some servers.

-------------------------------------------------------------------------------------------------------------------
Version 1.9.1.4
- Fixed a fatal error caused by a conflict with some themes.
- Fixed a XSS vulnerability.

-------------------------------------------------------------------------------------------------------------------
Version 1.9.1.3
- Fixed an issue with the capability required to export forms.

-------------------------------------------------------------------------------------------------------------------
Version 1.9.1.2
- Fixed issue where tabbing through Date field would skip the next field in the tabindex

-------------------------------------------------------------------------------------------------------------------
Version 1.9.1.1
- Fixed issue where tabbing through Date field would skip the next field in the tabindex.
- Fixed an issue with validation of the address field when the option to use values from another field is enabled and activated.
- Fixed an issue with the multi-file uploader not functioning when editing an entry if the user didn't have the gravityforms_edit_forms capability.
- Fixed an issue with notifications assigned to custom events, added via the gform_notification_events hook, being omitted from the resend notifications feature.
- AF: Fixed an issue with the way multi-input Email, Password, Date and Time fields are listed in field mapping drop downs when configuring a feed.
- AF: Updated GFAddOn::get_full_address() to use GF_Field_Address::get_country_code().
- AF: Updated GFAddOn::get_full_name() to include the middle name value for multi-input Name fields.
- API: Added support for arrays as entry search term values combined with operators IN and NOT IN. Credit to Scott Kingsley Clark from Pods Framework.
Example:
$search_criteria = array(
'status' => 'active',
'field_filters' => array(
array(
'key' => '2',
'operator' => 'IN', // or 'NOT IN'
'value' => array( 'Second Choice', 'Third Choice' ),
),
)
);
- API: Added filters for each endpoint of the Web API to allow the capabilities to be modified.
- gform_web_api_capability_get_forms
- gform_web_api_capability_post_forms
- gform_web_api_capability_put_forms
- gform_web_api_capability_delete_forms
- gform_web_api_capability_put_forms_properties
- gform_web_api_capability_post_form_submissions
- gform_web_api_capability_get_entries
- gform_web_api_capability_post_entries
- gform_web_api_capability_put_entries
- gform_web_api_capability_put_entries_properties
- gform_web_api_capability_delete_entries
- gform_web_api_capability_get_results
Example:
add_filter( 'gform_web_api_capability_post_form_submissions', 'filter_gform_web_api_capability_post_form_submissions');
function filter_gform_web_api_capability_post_form_submissions( $capability ) {
return 'my_capability_post_form_submissions';
}
- API: Fixed fatal error if invalid entry id passed to GFAPI::update_entry_field().
- API: Fixed a warning in the Web API while filtering entries. On some server configurations, and with debug enabled, WordPress may issue an array to string conversion warning when adding field filters to the search query arg. Although backwards compatibility remains, the entire search query arg should now be sent as a urlencoded JSON string.
- API: Fixed an issue with gform_get_meta and gform_update_meta which can result in multiple rows in the database for the same key if the value is updated with an empty string.

-------------------------------------------------------------------------------------------------------------------
Version 1.9.1
Expand Down
39 changes: 27 additions & 12 deletions common.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public static function add_htaccess_file(){
if ( file_exists( $htaccess_file ) ) {
unlink($htaccess_file);
}
$txt= '# Disable parsing of PHP for some server configurations.
$txt= '# Disable parsing of PHP for some server configurations. This file may be removed or modified on certain server configurations by using by the gform_upload_root_htaccess_rules filter. Please consult your system administrator before removing this file.
<Files *>
SetHandler none
SetHandler default-handler
Expand All @@ -166,8 +166,11 @@ public static function add_htaccess_file(){
php_flag engine off
</IfModule>';
$rules = explode( "\n", $txt );
insert_with_markers( $htaccess_file, 'Gravity Forms', $rules );

$rules = apply_filters( 'gform_upload_root_htaccess_rules', $rules );
if ( ! empty( $rules ) ) {
insert_with_markers( $htaccess_file, 'Gravity Forms', $rules );
}
}

public static function clean_number( $number, $number_format = '' ) {
Expand Down Expand Up @@ -1027,7 +1030,7 @@ public static function replace_variables_prepopulate( $text, $url_encode = false
$text = str_replace( $full_tag, $value, $text );
}

$text = apply_filters( 'gform_replace_merge_tags', $text, false, $entry, $url_encode, false, false, false );
$text = apply_filters( 'gform_replace_merge_tags', $text, false, $entry, $url_encode, $esc_html, false, false );

return $text;
}
Expand Down Expand Up @@ -1340,7 +1343,10 @@ private static function prepare_user_notification( $form, $lead, $override_optio

$message_format = apply_filters( "gform_notification_format_{$form['id']}", apply_filters( 'gform_notification_format', 'html', 'user', $form, $lead ), 'user', $form, $lead );
$message = GFCommon::replace_variables( rgget( 'message', $form['autoResponder'] ), $form, $lead, false, false, ! rgget( 'disableAutoformat', $form['autoResponder'] ), $message_format );
$message = do_shortcode( $message );

if ( apply_filters( 'gform_enable_shortcode_notification_message', true, $form, $lead ) ) {
$message = do_shortcode( $message );
}

//Running trough variable replacement
$to = GFCommon::replace_variables( $to, $form, $lead, false, false );
Expand Down Expand Up @@ -1372,7 +1378,10 @@ private static function prepare_admin_notification( $form, $lead, $override_opti

$message_format = apply_filters( "gform_notification_format_{$form['id']}", apply_filters( 'gform_notification_format', 'html', 'admin', $form, $lead ), 'admin', $form, $lead );
$message = GFCommon::replace_variables( rgget( 'message', $form['notification'] ), $form, $lead, false, false, ! rgget( 'disableAutoformat', $form['notification'] ), $message_format );
$message = do_shortcode( $message );

if ( apply_filters( 'gform_enable_shortcode_notification_message', true, $form, $lead ) ) {
$message = do_shortcode( $message );
}

$version_info = self::get_version_info();
$is_expired = ! rgempty( 'expiration_time', $version_info ) && $version_info['expiration_time'] < time();
Expand Down Expand Up @@ -1480,7 +1489,10 @@ public static function send_notification( $notification, $form, $lead ) {

$message_format = rgempty( 'message_format', $notification ) ? 'html' : rgar( $notification, 'message_format' );
$message = GFCommon::replace_variables( rgar( $notification, 'message' ), $form, $lead, false, false, ! rgar( $notification, 'disableAutoformat' ), $message_format );
$message = do_shortcode( $message );

if ( apply_filters( 'gform_enable_shortcode_notification_message', true, $form, $lead ) ) {
$message = do_shortcode( $message );
}

// allow attachments to be passed as a single path (string) or an array of paths, if string provided, add to array
$attachments = rgar( $notification, 'attachments' );
Expand Down Expand Up @@ -1573,7 +1585,9 @@ public static function get_notifications( $event, $form ) {

$notifications = array();
foreach ( $form['notifications'] as $notification ) {
if ( rgar( $notification, 'event' ) == $event ) {
$notification_event = rgar( $notification, 'event' );
$omit_from_resend = array( 'form_saved', 'form_save_email_requested' );
if ( $notification_event == $event || ( $event == 'resend_notifications' && ! in_array( $notification_event, $omit_from_resend ) ) ) {
$notifications[] = $notification;
}
}
Expand Down Expand Up @@ -1643,8 +1657,9 @@ private static function send_email( $from, $to, $bcc, $reply_to, $subject, $mess
GFCommon::log_debug( 'GFCommon::send_email(): Sending email via wp_mail().' );
GFCommon::log_debug( print_r( compact( 'to', 'subject', 'message', 'headers', 'attachments', 'abort_email' ), true ) );
$is_success = wp_mail( $to, $subject, $message, $headers, $attachments );
GFCommon::log_debug( "GFCommon::send_email(): Result from wp_mail(): {$is_success}" );
if ( $is_success ) {
$result = is_wp_error( $is_success ) ? $is_success->get_error_message() : $is_success;
GFCommon::log_debug( "GFCommon::send_email(): Result from wp_mail(): {$result}" );
if ( ! is_wp_error( $is_success ) && $is_success ) {
GFCommon::log_debug( 'GFCommon::send_email(): Mail was passed from WordPress to the mail server.' );
} else {
GFCommon::log_error( 'GFCommon::send_email(): The mail message was passed off to WordPress for processing, but WordPress was unable to send the message.' );
Expand Down Expand Up @@ -2239,7 +2254,7 @@ public static function get_checkbox_choices( $field, $value, $disabled_text ) {
}

/**
* @deprecated
* @deprecated Deprecated since 1.9. Use GF_Field_Checkbox::get_radio_choices() instead.
*
* @param GF_Field_Radio $field
* @param string $value
Expand Down Expand Up @@ -3496,8 +3511,8 @@ public static function gf_vars( $echo = true ) {
$gf_vars['thisFormButton'] = __( 'this form button if', 'gravityforms' );
$gf_vars['show'] = __( 'Show', 'gravityforms' );
$gf_vars['hide'] = __( 'Hide', 'gravityforms' );
$gf_vars['all'] = __( 'All', 'gravityforms' );
$gf_vars['any'] = __( 'Any', 'gravityforms' );
$gf_vars['all'] = _x( 'All', 'Conditional Logic', 'gravityforms' );
$gf_vars['any'] = _x( 'Any', 'Conditional Logic', 'gravityforms' );
$gf_vars['ofTheFollowingMatch'] = __( 'of the following match:', 'gravityforms' );
$gf_vars['is'] = __( 'is', 'gravityforms' );
$gf_vars['isNot'] = __( 'is not', 'gravityforms' );
Expand Down
48 changes: 25 additions & 23 deletions css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
admin.css
Gravity Forms Administration Styles
http: //www.gravityforms.com
updated: January 22, 2015 9:27 AM
updated: February 17, 2015 11:53 AM
Gravity Forms is a Rocketgenius project
copyright 2008-2015 Rocketgenius Inc.
Expand Down Expand Up @@ -471,6 +471,22 @@ img#gfield_input_datepicker_icon {
clear: left;
}

.ginput_complex.ginput_container.has_first_name span,
.ginput_complex.ginput_container.has_middle_name span,
.ginput_complex.ginput_container.has_last_name span {
width: 99.5%
}

.ginput_complex.ginput_container.has_first_name.has_last_name span {
width: 49%
}

.ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span {
width: 32%
}



.top_label .gfield_label {
display: block;
margin: 8px 0 4px 0;
Expand Down Expand Up @@ -4173,28 +4189,6 @@ table.form-table tr:last-child th {
border: none !important;
}

/* MP6 styles (Wp 3.8)- temporary ----------------------------------------------------*/



body.mp6 .field_edit_icon,
body.mp6 .form_edit_icon,
body.mp6 .field_delete_icon,
body.mp6 .form_delete_icon,
body.mp6 .field_duplicate_icon {
height: auto !important;
}


body.mp6 table tbody.user-list tr:nth-child(odd) {
background-color: #F9F9F9;
}

body.mp6 #namediv input[type=checkbox],
body.mp6 #namediv input[type=radio] {
width: auto !important;
}

span.gf_settings_description {
display: block;
margin-top: 6px;
Expand Down Expand Up @@ -4235,6 +4229,14 @@ a.gf_delete_field_choice:active {
color: #444;
}

/* form editor tweaks for 1.9 ----------------------------------------------------*/

span.ginput_left input.medium,
span.ginput_right input.medium,
.ginput_container.ginput_single_email input.medium {
width: 95% !important;
}


/* addon framework styles ----------------------------------------------------*/

Expand Down
Loading

0 comments on commit 2e12f61

Please sign in to comment.