From b0345ff2136820e7f55361938ddc4b3a399f3f11 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 8 Jun 2005 02:52:58 +0000 Subject: [PATCH] r248: Sorting out issues with select_single custom fields not showing up right --- showreport.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/showreport.php b/showreport.php index fa4e285..4bdfcbc 100644 --- a/showreport.php +++ b/showreport.php @@ -101,17 +101,32 @@ $fieldvalues = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bugvaluefill foreach ($fieldlist AS $shortname => $field) { - $customfields .= "
$field[name]: "; - if (is_null($fieldvalues["$shortname"])) { - $value = $field['defaultvalue']; + if ($field['type'] == 'select_single') + { + if ($field['usedefault']) + { + $temp = unserialize($field['selects']); + $value = trim($temp[0]); + } + else + { + continue; + } + } + else + { + $value = $field['defaultvalue']; + } } else { $value = $fieldvalues["$shortname"]; } + $customfields .= "
$field[name]: "; + if ($field['type'] == 'input_text' OR $field['type'] == 'select_single') { $customfields .= $value; -- 2.43.5