Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 74 lines (58 sloc) 2.325 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/>.
28a1430 * constant_inc.php
Julian Fitzell authored
16
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ ) - ...
grangeway authored
17 /**
18 * @package MantisBT
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
08c88f2 @davidhicks Update copyright year to 2011
davidhicks authored
20 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ ) - ...
grangeway authored
21 * @link http://www.mantisbt.org
22 */
23 /**
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
24 * MantisBT Core API's
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ ) - ...
grangeway authored
25 */
1ac5f0b More require_once statements added. Note that these new statements enabl...
Jeroen Latour authored
26 require_once( 'core.php' );
5efb2cd Fix for 0004975: Confirmation message in admin area
marcelloscata authored
27
c36df5b @grangeway following giallu's change to use set_include_path to set first require d...
grangeway authored
28 require_once( 'category_api.php' );
5efb2cd Fix for 0004975: Confirmation message in admin area
marcelloscata authored
29
b69fe75 @jreese Move all form_security_validate() calls before any processing happens.
jreese authored
30 form_security_validate( 'manage_proj_cat_delete' );
31
bb4f40f @jreese Fix #8336: Require re-login for high impact tasks.
jreese authored
32 auth_reauthenticate();
33
a374a7c @davidhicks Fix #12230: XSS vulnerability when deleting maliciously named categories
davidhicks authored
34 $f_category_id = gpc_get_int( 'id' );
fa7188f @jreese Completed #8435: Implement Global and Inheriting Categories Structure
jreese authored
35 $f_project_id = gpc_get_int( 'project_id' );
d6843bb Remove f_ prefix from POST and GET field names. The variables should al...
Julian Fitzell authored
36
0370da8 So finally, 2 days later, here is the access_api rewrite. I've tested i...
Julian Fitzell authored
37 access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id );
38
829889d @jreese First phase of bug #8435: Implement Global and Inheriting Categories Str...
jreese authored
39 $t_row = category_get_row( $f_category_id );
40 $t_name = category_full_name( $f_category_id );
41 $t_project_id = $t_row['project_id'];
42
6f93e2a @jreese Fix #3786: Show bug count when deleting categories.
jreese authored
43 # Get a bug count
44 $t_bug_table = db_get_table( 'mantis_bug_table' );
45 $t_query = "SELECT COUNT(id) FROM $t_bug_table WHERE category_id=" . db_param();
46 $t_bug_count = db_result( db_query_bound( $t_query, array( $f_category_id ) ) );
47
28a1430 * constant_inc.php
Julian Fitzell authored
48 # Confirm with the user
a374a7c @davidhicks Fix #12230: XSS vulnerability when deleting maliciously named categories
davidhicks authored
49 helper_ensure_confirmed( sprintf( lang_get( 'category_delete_sure_msg' ), string_display_line( $t_name ), $t_bug_count ),
5efb2cd Fix for 0004975: Confirmation message in admin area
marcelloscata authored
50 lang_get( 'delete_category_button' ) );
ca328e6 remove files that only perform a simple confirmation and use helper_ensu...
Julian Fitzell authored
51
829889d @jreese First phase of bug #8435: Implement Global and Inheriting Categories Str...
jreese authored
52 category_remove( $f_category_id );
bd552ac Renamed files to .php
Kenzaburo Ito authored
53
8c537f8 @jreese First step to implementing new form security purge().
jreese authored
54 form_security_purge( 'manage_proj_cat_delete' );
55
fa7188f @jreese Completed #8435: Implement Global and Inheriting Categories Structure
jreese authored
56 if ( $f_project_id == ALL_PROJECTS ) {
57 $t_redirect_url = 'manage_proj_page.php';
58 } else {
59 $t_redirect_url = 'manage_proj_edit_page.php?project_id=' . $f_project_id;
60 }
5efb2cd Fix for 0004975: Confirmation message in admin area
marcelloscata authored
61
230e3f4 @grangeway HTML api documentation + tidy up of api names
grangeway authored
62 html_page_top( null, $t_redirect_url );
3113add @vboctor Now db_connect is called once in core_database_API.php rather than at th...
vboctor authored
63 ?>
5efb2cd Fix for 0004975: Confirmation message in admin area
marcelloscata authored
64 <br />
65 <div align="center">
66 <?php
67 echo lang_get( 'operation_successful' ).'<br />';
68 print_bracket_link( $t_redirect_url, lang_get( 'proceed' ) );
69 ?>
70 </div>
71
230e3f4 @grangeway HTML api documentation + tidy up of api names
grangeway authored
72 <?php
624fafd @grangeway We dont use __FILE__ param of html_page_bottom. Note: someone who were t...
grangeway authored
73 html_page_bottom();
Something went wrong with that request. Please try again.