Skip to content

Commit 4c6e6f0

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 10ac96e commit 4c6e6f0

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
@@ -163,12 +163,8 @@ function mc_project_delete_category ($p_username, $p_password, $p_project_id, $p
163163
// find the id of the category
164164
$p_category_id = category_get_id_by_name( $p_category_name, $p_project_id );
165165

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

174170
/**

0 commit comments

Comments
 (0)