From 233b1a2b7db0479c41a4e08f9204ad4a6fc3df32 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 8 Jun 2005 23:28:55 +0000 Subject: [PATCH] r255: Delete field permissions when removing a field --- admin/fields.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/admin/fields.php b/admin/fields.php index d199f13..46808a3 100644 --- a/admin/fields.php +++ b/admin/fields.php @@ -41,6 +41,7 @@ if ($_REQUEST['do'] == 'kill') } $db->query("DELETE FROM " . TABLE_PREFIX . "bugfield WHERE fieldid = $field[fieldid]"); + $db->query("DELETE FROM " . TABLE_PREFIX . "bugfieldpermission WHERE fieldid = $field[fieldid]"); $db->query("ALTER TABLE " . TABLE_PREFIX . "bugvaluefill DROP field$field[fieldid]"); $db->query("OPTIMIZE TABLE " . TABLE_PREFIX . "bugvaluefill"); @@ -82,15 +83,6 @@ if ($_REQUEST['do'] == 'update') $type = $field['type']; } - if (empty($bugsys->in['shortname']) AND $add) - { - $admin->error('You must specify a short name/call name.'); - } - /*if ((preg_match('#[^a-z0-9_]#', $bugsys->in['shortname']) OR !preg_match('#^[a-z]#', $bugsys->in['shortname']) OR preg_match('#[^a-z0-9]$#', $bugsys->in['shortname'])) AND $add) - { - $admin->error('The short name can only contain lowercase letters, numbers, and underscores; it must also begin with a letter and cannot end in anything but a letter or a number.'); - }*/ - if (empty($bugsys->in['name'])) { $admin->error('You must specify a display name.'); @@ -238,7 +230,6 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') // global fields $admin->row_span('Global Fields', 'thead', 'center'); $admin->row_text('Field Type', $TYPES["$type"]); - #$admin->row_input('Short Name/Call Name', 'shortname', $field['shortname']); $admin->row_input('Display Name', 'name', $field['name']); $admin->row_textarea('Description', 'description', $field['description']); $admin->row_yesno('Required', 'required', $field['required']); -- 2.43.5