/
bugnote_update.php
36 lines (33 loc) · 1.17 KB
/
bugnote_update.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
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 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
?>
<?php
# Update bug data then redirect to the appropriate 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( REPORTER );
$f_bugnote_text = $f_bugnote_text."\n\n";
$f_bugnote_text = $f_bugnote_text.$s_edited_on.date( $g_normal_date_format );
$f_bugnote_text = string_prepare_textarea( $f_bugnote_text );
$f_bugnote_text_id = (integer)$f_bugnote_text_id;
$query = "UPDATE $g_mantis_bugnote_text_table
SET note='$f_bugnote_text'
WHERE id='$f_bugnote_text_id'";
$result = db_query( $query );
# updated the last_updated date
bugnote_date_update( $f_bugnote_id );
# Determine which view page to redirect back to.
$t_redirect_url = get_bug_link_plain( $f_id );
if ( $result ) {
print_header_redirect( $t_redirect_url );
} else {
print_mantis_error( ERROR_GENERIC );
}
?>