Skip to content

Commit

Permalink
* bug_api.php
Browse files Browse the repository at this point in the history
  (bug_resolve): add $p_handler_id and $p_duplicate_id parameters with default values


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1594 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Oct 27, 2002
1 parent b392926 commit ca33e9d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions core/bug_api.php
Expand Up @@ -6,7 +6,7 @@
# See the files README and LICENSE for details

# --------------------------------------------------------
# $Id: bug_api.php,v 1.15 2002-10-23 04:54:01 jfitzell Exp $
# $Id: bug_api.php,v 1.16 2002-10-27 22:53:04 jfitzell Exp $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -540,14 +540,23 @@ function bug_close( $p_bug_id, $p_bugnote_text='' ) {
}
# --------------------
# 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 );
}

Expand All @@ -564,7 +573,7 @@ function bug_reopen( $p_bug_id, $p_bugnote_text='' ) {
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 );
}

Expand Down

0 comments on commit ca33e9d

Please sign in to comment.