/
bug_resolve.php
41 lines (35 loc) · 1.4 KB
/
bug_resolve.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 Mantis Team - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: bug_resolve.php,v 1.26 2002-10-27 22:53:40 jfitzell Exp $
# --------------------------------------------------------
?>
<?php
# This file sets the bug to the chosen resolved state and adds a
# bugnote giving a reason for the resolution
?>
<?php require_once( 'core.php' ) ?>
<?php login_cookie_check() ?>
<?php
$f_bug_id = gpc_get_int( 'f_bug_id' );
$f_bugnote_text = gpc_get_string( 'f_bugnote_text', '' );
$f_resolution = gpc_get_int( 'f_resolution', FIXED );
$f_duplicate_id = gpc_get_int( 'f_duplicate_id', null );
$f_close_now = gpc_get_bool( 'f_close_now' );
project_access_check( $f_bug_id );
check_access( config_get( 'handle_bug_threshold' ) );
bug_ensure_exists( $f_bug_id );
# make sure it is not market as duplicate to itself
if ( $f_duplicate_id == $f_bug_id ) {
print_mantis_error( ERROR_BUG_DUPLICATE_SELF );
}
bug_resolve( $f_bug_id, $f_resolution, $f_bugnote_text, $f_duplicate_id );
if ( $f_close_now ) {
bug_set_field( $f_bug_id, 'status', CLOSED );
}
print_header_redirect_view( $f_bug_id );
?>