Skip to content
Newer
Older
100644 48 lines (37 sloc) 1.61 KB
57c6d9f @vboctor - Added support for deleting configuration from the database.
vboctor authored May 18, 2006
1 <?php
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
2 # MantisBT - a php based bugtracking system
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored Oct 24, 2007
3
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
4 # MantisBT is free software: you can redistribute it and/or modify
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored Oct 24, 2007
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 Feb 14, 2009
9 # MantisBT is distributed in the hope that it will be useful,
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored Oct 24, 2007
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 Feb 14, 2009
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
57c6d9f @vboctor - Added support for deleting configuration from the database.
vboctor authored May 18, 2006
16
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored Sep 25, 2008
17 /**
18 * @package MantisBT
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
c757c81 @dregad Update copyright year to 2012
dregad authored Jan 1, 2012
20 * @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 Sep 25, 2008
21 * @link http://www.mantisbt.org
22 */
23 /**
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
24 * MantisBT Core API's
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored Sep 25, 2008
25 */
57c6d9f @vboctor - Added support for deleting configuration from the database.
vboctor authored May 18, 2006
26 require_once( 'core.php' );
27
2e3c614 @davidhicks Add CSRF protection for adm_config_delete
davidhicks authored Jul 7, 2009
28 form_security_validate( 'adm_config_delete' );
55d1b1e @thraxisp fix for #8995: CSRF Vulnerabilities in user_create
thraxisp authored Mar 23, 2008
29
57c6d9f @vboctor - Added support for deleting configuration from the database.
vboctor authored May 18, 2006
30 $f_user_id = gpc_get_int( 'user_id' );
31 $f_project_id = gpc_get_int( 'project_id' );
32 $f_config_option = gpc_get_string( 'config_option' );
33
34 if ( $f_project_id == ALL_PROJECTS ) {
35 access_ensure_global_level( config_get( 'set_configuration_threshold' ) );
36 } else {
37 access_ensure_project_level( config_get( 'set_configuration_threshold' ), $f_project_id );
38 }
39
40 helper_ensure_confirmed( lang_get( 'delete_config_sure_msg' ), lang_get( 'delete_link' ) );
41
42 config_delete( $f_config_option, $f_user_id, $f_project_id );
43
e5aee41 @davidhicks Fix typo in adm_config_delete
davidhicks authored Jul 9, 2009
44 form_security_purge( 'adm_config_delete' );
2e3c614 @davidhicks Add CSRF protection for adm_config_delete
davidhicks authored Jul 6, 2009
45
57c6d9f @vboctor - Added support for deleting configuration from the database.
vboctor authored May 18, 2006
46 print_successful_redirect( 'adm_config_report.php' );
5cf7970 @grangeway Consistency update
grangeway authored Apr 7, 2009
47
Something went wrong with that request. Please try again.