Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit acd7562

Browse files
committedNov 21, 2012
soap api: fall back to the default_category_for_moves when deleting
categories Fixes #15222: mc_project_delete_category fails to delete category
1 parent 9ddbfae commit acd7562

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

Diff for: ‎api/soap/mc_project_api.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,8 @@ function mc_project_delete_category ($p_username, $p_password, $p_project_id, $p
164164
// find the id of the category
165165
$p_category_id = category_get_id_by_name( $p_category_name, $p_project_id );
166166

167-
// delete the category and link all the issue to the general category if available
168-
$t_dest_category_id = 1;
169-
if ( !category_exists( $t_dest_category_id ) ) {
170-
$t_dest_category_id = 0;
171-
}
172-
return category_remove( $p_category_id, $t_dest_category_id );
167+
// delete the category and link all the issue to the default category
168+
return category_remove( $p_category_id, config_get('default_category_for_moves') );
173169
}
174170

175171
/**

0 commit comments

Comments
 (0)
Please sign in to comment.