View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009320 | mantisbt | api soap | public | 2008-06-30 20:36 | 2009-01-15 11:26 |
Reporter | lukasschroeder | Assigned To | vboctor | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.0a1 | ||||
Fixed in Version | 1.2.0a3 | ||||
Summary | 0009320: mc_filter_get broken after refactoring api/soap/mc_filter_api.php for 1.2.0a1 [patch] | ||||
Description |
the patch keeps the refactoring, e.g. does not reintroduce the mci_ version, but refactors filter_dbget....() and its users. patch applies to v1.2.0a1 | ||||
Tags | patch | ||||
Attached Files | mantis_120a1_mconnect_filter_get.diff (3,758 bytes)
Index: query_store_page.php =================================================================== --- query_store_page.php (revision 4) +++ query_store_page.php (working copy) @@ -43,9 +43,9 @@ # Let's just see if any of the current filters are the # same as the one we're about the try and save - foreach( $t_query_arr as $t_id => $t_name ) { - if ( filter_db_get_filter( $t_id ) == $t_query_to_store ) { - print lang_get( 'query_exists' ) . ' (' . $t_name . ')<br />'; + foreach( $t_query_arr as $t_query_row ) { + if ( filter_db_get_filter( $t_query_row["id"] ) == $t_query_to_store ) { + print lang_get( 'query_exists' ) . ' (' . $t_query_row["name"] . ')<br />'; } } Index: query_store.php =================================================================== --- query_store.php (revision 4) +++ query_store.php (working copy) @@ -49,8 +49,8 @@ # Check and make sure they don't already have a # query with the same name $t_query_arr = filter_db_get_available_queries(); - foreach( $t_query_arr as $t_id => $t_name ) { - if ( $f_query_name == $t_name ) { + foreach( $t_query_arr as $t_query_row ) { + if ( $f_query_name == $t_query_row["name"] ) { $t_query_redirect_url = $t_query_redirect_url . '?error_msg=' . urlencode( lang_get( 'query_dupe_name' ) ); print_header_redirect( $t_query_redirect_url ); Index: api/soap/mc_filter_api.php =================================================================== --- api/soap/mc_filter_api.php (revision 4) +++ api/soap/mc_filter_api.php (working copy) @@ -116,7 +116,7 @@ $t_issue['additional_information'] = mci_null_if_empty( $t_additional_information ); $t_issue['attachments'] = mci_issue_get_attachments( $t_issue_data['id'] ); - $t_issue['relationships'] = mci_issue_get_relationships( $t_issue_data['id'], $t_issue_id ); + $t_issue['relationships'] = mci_issue_get_relationships( $t_issue_data['id'], $t_user_id ); $t_issue['notes'] = mci_issue_get_notes( $t_issue_data['id'] ); $t_issue['custom_fields'] = mci_issue_get_custom_fields( $t_issue_data['id'] ); Index: core/filter_api.php =================================================================== --- core/filter_api.php (revision 4) +++ core/filter_api.php (working copy) @@ -2845,8 +2845,8 @@ <option value="-1"><?php PRINT '[' . lang_get( 'reset_query' ) . ']' ?></option> <option value="-1"></option> <?php - foreach( $t_stored_queries_arr as $t_query_id => $t_query_name ) { - PRINT '<option value="' . $t_query_id . '">' . $t_query_name . '</option>'; + foreach( $t_stored_queries_arr as $t_query_row ) { + PRINT '<option value="' . $t_query_row["id"] . '">' . $t_query_row["name"] . '</option>'; } ?> </select> @@ -3138,12 +3138,12 @@ 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_overall_query_arr[$row['id']] = $row['name']; + $t_overall_query_arr[$row['name']] = $row; } } - $t_overall_query_arr = array_unique( $t_overall_query_arr ); - asort( $t_overall_query_arr ); + ksort( $t_overall_query_arr ); + $t_overall_query_arr = array_values( $t_overall_query_arr ); return $t_overall_query_arr; } Index: query_view_page.php =================================================================== --- query_view_page.php (revision 4) +++ query_view_page.php (working copy) @@ -55,7 +55,9 @@ $t_column_count = 0; $t_max_column_count = 2; - foreach( $t_query_arr as $t_id => $t_name ) { + foreach( $t_query_arr as $t_row ) { + $t_id = $t_row["id"]; + $t_name = $t_row["name"]; if ( $t_column_count == 0 ) { print '<tr ' . helper_alternate_class() . '>'; } | ||||
...there seems to be even more broken with 1.2.0a1 and at least the eclipse plugin. i cannot successfully load query results with 1.2.0a1 |
|
api/soap/mc_issue_api.php not recactored in line with interface change of bugnote_get_all_visible_bugnotes(...) Index: api/soap/mc_issue_api.php--- api/soap/mc_issue_api.php (revision 10)
|
|
Hello, From what I can tell having just been over this patch, the issues that this patch fixes (ignoring formatting changes) have already been commited to git.mantisbt.org Thanks |
|