From 9561f181383fa4fb9412b9cc80255d1d1f5e9162 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 8 Jun 2005 03:12:34 +0000 Subject: [PATCH] r251: If you set it as the blank option, it should insert a value into the database. There should be no way to return the value back to NULL in the db. --- includes/functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 831761a..e60e1c1 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -462,7 +462,9 @@ function process_custom_fields($bugid, $inputdata = array()) } if (isset($inputdata["$field[shortname]"])) - { + { + $fieldbuild[] = $field['shortname']; + if ($field['type'] == 'input_text') { $fieldvalue[] = "'" . $inputdata["$field[shortname]"] . "'"; @@ -471,14 +473,13 @@ function process_custom_fields($bugid, $inputdata = array()) { if ($inputdata["$field[shortname]"] == -1) { + $fieldvalue[] = "''"; continue; } $temp = unserialize($field['selects']); $fieldvalue[] = "'" . trim($temp[ intval($inputdata["$field[shortname]"]) ]) . "'"; } - - $fieldbuild[] = $field['shortname']; } } -- 2.22.5