Skip to content

Commit

Permalink
Fix filter APIs
Browse files Browse the repository at this point in the history
The filter API was broken by recent refactoring causing it to return invalid id, name, public, and extra _filter_id.
This broke both REST and SOAP APIs.

Fixes #24335, #24349
  • Loading branch information
vboctor committed Apr 28, 2018
1 parent e92176e commit b739c9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/classes/FilterConverter.class.php
Expand Up @@ -614,6 +614,7 @@ private function convertTypeToJson( &$p_criteria ) {
unset( $p_criteria['_version'] );
unset( $p_criteria['_source_query_id'] );
unset( $p_criteria['_view_type'] );
unset( $p_criteria['_filter_id'] );
}

/**
Expand Down
2 changes: 2 additions & 0 deletions core/filter_api.php
Expand Up @@ -3096,6 +3096,8 @@ function filter_db_get_available_queries( $p_project_id = null, $p_user_id = nul
if( !$t_filter_obj ) {
continue;
}

$t_row = filter_get_row( $t_filter_id );
$t_row['criteria'] = $t_filter_obj;
$t_row['url'] = filter_get_url( $t_filter_obj );
$t_filter_data[$t_filter_name] = $t_row;
Expand Down

0 comments on commit b739c9f

Please sign in to comment.