/
bug_assign.php
55 lines (45 loc) · 1.49 KB
/
bug_assign.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
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000, 2001 Kenzaburo Ito - kenito@300baud.org
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# This module is based on bug_update.php3 and provides a quick method
# for assigning a call to the currently signed on user.
# Copyright (C) 2001 Steve Davies - steved@ihug.co.nz
?>
<?php
# Assign bug to user then redirect to viewing page
?>
<?php include( "core_API.php" ) ?>
<?php login_cookie_check() ?>
<?php
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
project_access_check( $f_id );
check_access( DEVELOPER );
check_bug_exists( $f_id );
$t_ass_val = ASSIGNED;
# get user id
$t_handler_id = get_current_user_field( "id" );
$query = "UPDATE $g_mantis_bug_table
SET handler_id='$t_handler_id', status='$t_ass_val'
WHERE id='$f_id'";
$result = db_query($query);
# updated the last_updated date
bug_date_update( $f_id );
# send assigned to email
email_assign( $f_id );
# Determine which view page to redirect back to.
$t_redirect_url = get_view_redirect_url( $f_id );
if (( ON == $g_quick_proceed )&&( $result )) {
print_header_redirect( $t_redirect_url );
}
?>
<?php print_page_top1() ?>
<?php
if ( $result ) {
print_meta_redirect( $t_redirect_url );
}
?>
<?php print_page_top2() ?>
<?php print_proceed( $result, $query, $t_redirect_url ) ?>
<?php print_page_bot1( __FILE__ ) ?>