Skip to content

Commit

Permalink
Release 2.30.1 (#2172)
Browse files Browse the repository at this point in the history
This hotfix release resolves an issue with the Multiple Forms extension.

#### 🐛 Fixed
* Fatal error in the View editor when using joined data from multiple
forms.
  • Loading branch information
mrcasual authored Oct 15, 2024
2 parents e717f2b + c8c3b6f commit d8a0c54
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 9 deletions.
4 changes: 2 additions & 2 deletions gravityview.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: GravityView
* Plugin URI: https://www.gravitykit.com
* Description: The best, easiest way to display Gravity Forms entries on your website.
* Version: 2.30
* Version: 2.30.1
* Requires PHP: 7.4.0
* Author: GravityKit
* Author URI: https://www.gravitykit.com
Expand Down Expand Up @@ -32,7 +32,7 @@
/**
* The plugin version.
*/
define( 'GV_PLUGIN_VERSION', '2.30' );
define( 'GV_PLUGIN_VERSION', '2.30.1' );

/**
* Full path to the GravityView file
Expand Down
10 changes: 10 additions & 0 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ public function changelog_screen() {
* - If 4.28, include to 4.26.
*/
?>
<h3>2.30.1 on October 15, 2024</h3>

<p>This hotfix release resolves an issue with the Multiple Forms extension.</p>

<h4>🐛 Fixed</h4>

<ul>
<li>Fatal error in the View editor when using joined data from multiple forms.</li>
</ul>

<h3>2.30 on October 14, 2024</h3>

<p>This release adds the ability to change the entry creator from the Edit Entry screen, improves upload handling, fixes various bugs, and updates internal components.</p>
Expand Down
24 changes: 18 additions & 6 deletions includes/class-gravityview-change-entry-creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,17 @@ public function register_gform_noconflict( $assets ) {
*
* @since 2.30.0
*
* @param GF_Field[] $fields The registered fields.
* @param array $form The form object.
* @param string $zone The fields zone.
* @param GF_Field[] $fields The registered fields.
* @param string|array $form The form object.
* @param string $zone The fields zone.
*
* @return array The updated fields array.
*/
public function register_edit_field( array $fields, array $form, string $zone ): array {
public function register_edit_field( $fields, $form, $zone ): array {
if ( ! is_array( $fields ) ) {
$fields = (array) $fields;
}

if ( 'edit' !== $zone ) {
return $fields;
}
Expand All @@ -488,9 +492,13 @@ public function register_edit_field( array $fields, array $form, string $zone ):
*
* @return array The updated fields array.
*/
public function register_created_by_input( array $fields, ?array $editable_fields, array $form ): array {
public function register_created_by_input( $fields, $editable_fields, $form ): array {
require_once GFCommon::get_base_path() . '/export.php';

if ( ! is_array( $fields ) ) {
$fields = (array) $fields;
}

// Don't add the `created_by` field if the user can't change it.
$editable_field_ids = array_flip(
array_map(
Expand Down Expand Up @@ -541,7 +549,11 @@ static function ( GF_Field $a, GF_Field $b ) use ( $sort_order_lookup ): int {
*
* @return array The new capabilities.
*/
public function created_by_visibility_caps( array $caps, string $template, string $field ): array {
public function created_by_visibility_caps( $caps, $template, $field ): array {
if ( ! is_array( $caps ) ) {
$caps = (array) $caps;
}

if ( 'created_by' !== $field || false === strpos( $template, 'edit' ) ) {
return $caps;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ function ( $messages ) use ( $check_logs_message ) {
return;
}

$entry_id = (int) $_GET['entry_id'] ?? 0;
$entry_id = (int) ( $_GET['entry_id'] ?? 0 );

if ( ! GVCommon::has_cap( array( 'gravityforms_edit_entries', 'gform_full_access', 'gravityview_full_access' ), $entry_id ) ) {
return;
Expand Down
7 changes: 7 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h

== Changelog ==

= 2.30.1 on October 15, 2024 =

This hotfix release resolves an issue with the Multiple Forms extension.

#### 🐛 Fixed
* Fatal error in the View editor when using joined data from multiple forms.

= 2.30 on October 14, 2024 =

This release adds the ability to change the entry creator from the Edit Entry screen, improves upload handling, fixes various bugs, and updates internal components.
Expand Down

0 comments on commit d8a0c54

Please sign in to comment.