From 41aab3786be421aa7bbbbf14176755e5fc306e68 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 7 Jun 2005 00:44:54 +0000 Subject: [PATCH] r244: Setting up for custom field searchability. --- admin/fields.php | 8 ++++---- docs/schema_changes.sql | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/admin/fields.php b/admin/fields.php index 2890184..f12d51a 100644 --- a/admin/fields.php +++ b/admin/fields.php @@ -140,11 +140,11 @@ if ($_REQUEST['do'] == 'update') $db->query(" INSERT INTO bugfield - (shortname, name, description, type, required, private, $extrafields) + (shortname, name, description, type, required, cansearch, $extrafields) VALUES ('" . $bugsys->in['shortname'] . "', '" . $bugsys->in['name'] . "', '" . $bugsys->in['description'] . "', '$type', " . intval($bugsys->in['required']) . ", - " . intval($bugsys->in['private']) . ", $extradata + " . intval($bugsys->in['cansearch']) . ", $extradata )" ); @@ -158,7 +158,7 @@ if ($_REQUEST['do'] == 'update') SET name = '" . $bugsys->in['name'] . "', description = '" . $bugsys->in['description'] . "', required = " . intval($bugsys->in['required']) . ", - private = " . intval($bugsys->in['private']) . ", + cansearch = " . intval($bugsys->in['cansearch']) . ", $extraupdate WHERE fieldid = " . intval($bugsys->in['fieldid']) ); @@ -236,7 +236,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') $admin->row_input('Display Name', 'name', $field['name']); $admin->row_textarea('Description', 'description', $field['description']); $admin->row_yesno('Required', 'required', $field['required']); - $admin->row_yesno('Private Field', 'private', $field['private']); + $admin->row_yesno('Can Be Searched', 'cansearch', ((isset($field['cansearch'])) ? $field['cansearch'] : true)); // type-specific fields $admin->row_span('Type-Specific Fields', 'thead', 'center'); diff --git a/docs/schema_changes.sql b/docs/schema_changes.sql index 85854bd..0e81091 100644 --- a/docs/schema_changes.sql +++ b/docs/schema_changes.sql @@ -66,4 +66,6 @@ CREATE TABLE `bugfieldpermission` ( `fieldid` INT(10) UNSIGNED NOT NULL, `mask` INT(5) UNSIGNED NOT NULL, PRIMARY KEY (`permissionid`, `fieldid`) -); \ No newline at end of file +); + +ALTER TABLE `bugfield` CHANGE `private` `cansearch` INT(2) DEFAULT '0' NOT NULL \ No newline at end of file -- 2.43.5