From: <jfi...@us...> - 2002-10-27 22:53:08
|
Update of /cvsroot/mantisbt/mantisbt/core In directory usw-pr-cvs1:/tmp/cvs-serv15613/core Modified Files: bug_api.php Log Message: * bug_api.php (bug_resolve): add $p_handler_id and $p_duplicate_id parameters with default values Index: bug_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/bug_api.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- bug_api.php 23 Oct 2002 04:54:01 -0000 1.15 +++ bug_api.php 27 Oct 2002 22:53:04 -0000 1.16 @@ -540,14 +540,23 @@ } # -------------------- # resolve the given bug - function bug_resolve( $p_bug_id, $p_resolution, $p_bugnote_text='' ) { + function bug_resolve( $p_bug_id, $p_resolution, $p_bugnote_text = '', $p_duplicate_id = null, $p_handler_id = null ) { $p_bugnote_text = trim( $p_bugnote_text ); bug_set_field( $p_bug_id, 'status', RESOLVED ); bug_set_field( $p_bug_id, 'resolution', (int)$p_resolution ); + if ( null !== $p_duplicate_id ) { + bug_set_field( $p_bug_id, 'duplicate_id', (int)$p_duplicate_id ); + } + + if ( null == $p_handler_id ) { + $p_handler_id = auth_get_current_user_id(); + } + bug_set_field( $p_bug_id, 'handler_id', $p_handler_id ); + # Add bugnote if supplied - if ( $p_bugnote_text != '' ) { + if ( '' != $p_bugnote_text ) { bugnote_add( $p_bug_id, $p_bugnote_text ); } @@ -564,7 +573,7 @@ bug_set_field( $p_bug_id, 'resolution', REOPENED ); # Add bugnote if supplied - if ( $p_bugnote_text != '' ) { + if ( '' != $p_bugnote_text ) { bugnote_add( $p_bug_id, $p_bugnote_text ); } |