/
bug_actiongroup.php
70 lines (59 loc) · 2.07 KB
/
bug_actiongroup.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?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_actiongroup.php,v 1.16 2002-10-23 00:50:53 jfitzell Exp $
# --------------------------------------------------------
?>
<?php
# This page allows actions to be performed an an array of bugs
?>
<?php require_once( 'core.php' ) ?>
<?php login_cookie_check() ?>
<?php
$f_action = gpc_get_string( 'f_action' );
$f_bug_arr = gpc_get_int_array( 'f_bug_arr', array() );
foreach( $f_bug_arr as $t_bug_id ) {
bug_ensure_exists( $t_bug_id );
switch ( $f_action ) {
case 'CLOSE':
check_access( config_get( 'close_bug_threshold' ) );
bug_close( $t_bug_id );
break;
case 'DELETE':
check_access( config_get( 'allow_bug_delete_access_level' ) );
bug_delete( $t_bug_id );
break;
case 'MOVE':
check_access( config_get( 'bug_move_access_level' ) );
$f_project_id = gpc_get_int( 'f_project_id' );
bug_set_field( $t_bug_id, 'project_id', $f_project_id );
break;
case 'ASSIGN':
check_access( config_get( 'update_bug_threshold' ) );
// @@@ Check that $f_assign has access to handle a bug.
$f_assign = gpc_get_int( 'f_assign' );
bug_assign( $t_bug_id, $f_assign );
break;
case 'RESOLVE':
check_access( config_get( 'handle_bug_threshold' ) );
$f_resolution = gpc_get_int( 'f_resolution' );
bug_resolve( $t_bug_id, $f_resolution );
break;
case 'UP_PRIOR':
check_access( config_get( 'update_bug_threshold' ) );
$f_priority = gpc_get_int( 'f_priority' );
bug_set_field( $t_bug_id, 'priority', $f_priority );
break;
case 'UP_STATUS':
check_access( config_get( 'update_bug_threshold' ) );
$f_status = gpc_get_int( 'f_status' );
bug_set_field( $t_bug_id, 'status', $f_status );
break;
}
}
print_meta_redirect( 'view_all_bug_page.php', 0 );
?>