/
manage_custom_field_delete.php
51 lines (40 loc) · 1.46 KB
/
manage_custom_field_delete.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2003 Mantis Team - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: manage_custom_field_delete.php,v 1.9 2003-01-25 21:13:18 jlatour Exp $
# --------------------------------------------------------
?>
<?php
require_once( 'core.php' );
$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'custom_field_api.php' );
?>
<?php login_cookie_check() ?>
<?php
check_access( config_get( 'manage_custom_fields' ) );
$f_field_id = gpc_get_int( 'field_id' );
$f_return = gpc_get_string( 'return', 'manage_custom_field_page.php' );
if( 0 < count( custom_field_get_project_ids( $f_field_id ) ) ) {
helper_ensure_confirmed( lang_get( 'confirm_used_custom_field_deletion' ),
lang_get( 'field_delete_button' ) );
} else {
helper_ensure_confirmed( lang_get( 'confirm_custom_field_deletion' ),
lang_get( 'field_delete_button' ) );
}
custom_field_destroy( $f_field_id );
print_page_top1();
print_meta_redirect( $f_return );
print_page_top2();
?>
<br />
<div align="center">
<?php
echo lang_get( 'operation_successful' ) . '<br />';
print_bracket_link( $f_return, lang_get( 'proceed' ) );
?>
</div>
<?php print_page_bot1( __FILE__ ) ?>