Skip to content

Commit

Permalink
Fix get entries query
Browse files Browse the repository at this point in the history
  • Loading branch information
zahardev committed Nov 11, 2024
1 parent 67e1ef3 commit 0da305f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions future/includes/class-gv-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,9 @@ public function get_entries( $request = null ) {
foreach ( $this->joins as $join ) {
$query = $join->as_query_join( $query );

if ( $this->settings->get( 'multiple_forms_disable_null_joins' ) ) {
$is_strict_mode = $this->settings->get( 'multiple_forms_disable_null_joins' );

if ( $is_strict_mode ) {

// Disable NULL outputs
$condition = new \GF_Query_Condition(
Expand Down Expand Up @@ -1251,7 +1253,10 @@ public function get_entries( $request = null ) {
);

$q = $query->_introspect();
$query->where( \GF_Query_Condition::_and( $q['where'], $status_conditions ) );

$relation = $is_strict_mode ? '_and' : '_or';

$query->where( \GF_Query_Condition::$relation( $q['where'], $status_conditions ) );

/**
* Applies legacy modifications to Query for is_approved settings.
Expand Down

0 comments on commit 0da305f

Please sign in to comment.