1<?php 2# MantisBT - A PHP based bugtracking system 3 4# MantisBT is free software: you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# the Free Software Foundation, either version 2 of the License, or 7# (at your option) any later version. 8# 9# MantisBT is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. 16 17/** 18 * Remove the bugnote and bugnote text and redirect back to 19 * the viewing page 20 * 21 * @package MantisBT 22 * @copyright Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 23 * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net 24 * @link http://www.mantisbt.org 25 * 26 * @uses core.php 27 * @uses form_api.php 28 * @uses gpc_api.php 29 * @uses print_api.php 30 * @uses string_api.php 31 */ 32 33require_once( 'core.php' ); 34require_api( 'form_api.php' ); 35require_api( 'gpc_api.php' ); 36require_api( 'print_api.php' ); 37require_api( 'string_api.php' ); 38 39form_security_validate( 'bugnote_delete' ); 40 41$f_bugnote_id = gpc_get_int( 'bugnote_id' ); 42 43helper_ensure_confirmed( lang_get( 'delete_bugnote_sure_msg' ), 44 lang_get( 'delete_bugnote_button' ) ); 45 46$t_data = array( 'query' => array( 'id' => $f_bugnote_id ) ); 47 48$t_command = new IssueNoteDeleteCommand( $t_data ); 49$t_result = $t_command->execute(); 50 51form_security_purge( 'bugnote_delete' ); 52 53print_successful_redirect( string_get_bug_view_url( $t_result['issue_id'] ) . '#bugnotes' ); 54