Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 54 lines (41 sloc) 1.851 kB
bd552ac Renamed files to .php
Kenzaburo Ito authored
1 <?php
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
2 # MantisBT - a php based bugtracking system
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored
3
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
4 # MantisBT is free software: you can redistribute it and/or modify
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored
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 #
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
9 # MantisBT is distributed in the hope that it will be useful,
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored
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
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
8bcf796 Cleanup of files
Julian Fitzell authored
16
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored
17 /**
18 * Delete a file from a bug and then view the bug
19 *
20 * @package MantisBT
21 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
c757c81 @dregad Update copyright year to 2012
dregad authored
22 * @copyright Copyright (C) 2002 - 2012 MantisBT Team - mantisbt-dev@lists.sourceforge.net
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored
23 * @link http://www.mantisbt.org
24 */
25 /**
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
26 * MantisBT Core API's
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored
27 */
9eff4d3 First commit in an effort to reduce the number of API files opened at…
Jeroen Latour authored
28 require_once( 'core.php' );
3082bf8 Added user confirmation when deleting an attachment (bug #4889)
marcelloscata authored
29
c36df5b @grangeway following giallu's change to use set_include_path to set first requir…
grangeway authored
30 require_once( 'file_api.php' );
3082bf8 Added user confirmation when deleting an attachment (bug #4889)
marcelloscata authored
31
5949871 @davidhicks Add CSRF protection for bug_file_delete
davidhicks authored
32 form_security_validate( 'bug_file_delete' );
55d1b1e @thraxisp fix for #8995: CSRF Vulnerabilities in user_create
thraxisp authored
33
d6843bb Remove f_ prefix from POST and GET field names. The variables should…
Julian Fitzell authored
34 $f_file_id = gpc_get_int( 'file_id' );
1930be4 @vboctor Added a new mode for uploading files, that is to upload files to an FTP
vboctor authored
35
8bcf796 Cleanup of files
Julian Fitzell authored
36 $t_bug_id = file_get_field( $f_file_id, 'bug_id' );
bd552ac Renamed files to .php
Kenzaburo Ito authored
37
41f3745 @thraxisp Additional fixes for 0005432: Viewing a bug should change the "curren…
thraxisp authored
38 $t_bug = bug_get( $t_bug_id, true );
39 if( $t_bug->project_id != helper_get_current_project() ) {
40 # in case the current project is not the same project of the bug we are viewing...
41 # ... override the current project. This to avoid problems with categories and handlers lists etc.
42 $g_project_override = $t_bug->project_id;
43 }
44
c15dc49 @jreese Fix #11293: Obey project overrides for configs
jreese authored
45 access_ensure_bug_level( config_get( 'update_bug_threshold' ), $t_bug_id );
46
3082bf8 Added user confirmation when deleting an attachment (bug #4889)
marcelloscata authored
47 helper_ensure_confirmed( lang_get( 'delete_attachment_sure_msg' ), lang_get( 'delete_attachment_button' ) );
48
eb657ca @thraxisp fix for 0004659: FTP unload don't work fine
thraxisp authored
49 file_delete( $f_file_id, 'bug' );
65b180e Added bug history functionality.
Kenzaburo Ito authored
50
5949871 @davidhicks Add CSRF protection for bug_file_delete
davidhicks authored
51 form_security_purge( 'bug_file_delete' );
52
8bcf796 Cleanup of files
Julian Fitzell authored
53 print_header_redirect_view( $t_bug_id );
Something went wrong with that request. Please try again.