Skip to content

Commit

Permalink
Return the filter url in the FilterData
Browse files Browse the repository at this point in the history
Bug: 12765 ( Include the filter url when returning filters )
  • Loading branch information
rombert committed Feb 13, 2011
1 parent ba09954 commit 45ef6c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/soap/mantisconnect.php
Expand Up @@ -428,7 +428,8 @@
'project_id' => array( 'name' => 'project_id', 'type' => 'xsd:integer', 'minOccurs' => '0' ),
'is_public' => array( 'name' => 'is_public', 'type' => 'xsd:boolean', 'minOccurs' => '0' ),
'name' => array( 'name' => 'name', 'type' => 'xsd:string', 'minOccurs' => '0' ),
'filter_string' => array( 'name' => 'filter_string', 'type' => 'xsd:string', 'minOccurs' => '0' )
'filter_string' => array( 'name' => 'filter_string', 'type' => 'xsd:string', 'minOccurs' => '0' ),
'url' => array( 'name' => 'url', 'type' => 'xsd:string', 'minOccurs' => '0' )
)
);

Expand Down
5 changes: 5 additions & 0 deletions api/soap/mc_api.php
Expand Up @@ -263,6 +263,11 @@ function mci_filter_db_get_available_queries( $p_project_id = null, $p_user_id =
for( $i = 0;$i < $query_count;$i++ ) {
$row = db_fetch_array( $result );
if(( $row['user_id'] == $t_user_id ) || db_prepare_bool( $row['is_public'] ) ) {

$t_filter_detail = explode( '#', $row['filter_string'], 2 );
$t_filter = unserialize( $t_filter_detail[1] );
$t_filter = filter_ensure_valid_filter( $t_filter );
$row['url'] = filter_get_url( $t_filter );
$t_overall_query_arr[$row['name']] = $row;
}
}
Expand Down
1 change: 1 addition & 0 deletions api/soap/mc_filter_api.php
Expand Up @@ -31,6 +31,7 @@ function mc_filter_get( $p_username, $p_password, $p_project_id ) {
$t_filter['is_public'] = $t_filter_row['is_public'];
$t_filter['name'] = $t_filter_row['name'];
$t_filter['filter_string'] = $t_filter_row['filter_string'];
$t_filter['url'] = $t_filter_row['url'];
$t_result[] = $t_filter;
}
return $t_result;
Expand Down

0 comments on commit 45ef6c7

Please sign in to comment.