From f07e76529da5e6e9b114e35983bc885bd0fdb65a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 8 Jun 2005 23:03:52 +0000 Subject: [PATCH] r253: Getting the new cusotm fields to work again --- showreport.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/showreport.php b/showreport.php index 4bdfcbc..c388eb1 100644 --- a/showreport.php +++ b/showreport.php @@ -94,14 +94,14 @@ $allfields = $db->query(" ); while ($field = $db->fetch_array($allfields)) { - $fieldlist["$field[shortname]"] = $field; + $fieldlist["$field[fieldid]"] = $field; } $fieldvalues = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bugvaluefill WHERE bugid = $bug[bugid]"); -foreach ($fieldlist AS $shortname => $field) +foreach ($fieldlist AS $fieldid => $field) { - if (is_null($fieldvalues["$shortname"])) + if (is_null($fieldvalues["field$fieldid"])) { if ($field['type'] == 'select_single') { @@ -109,9 +109,11 @@ foreach ($fieldlist AS $shortname => $field) { $temp = unserialize($field['selects']); $value = trim($temp[0]); + echo 'using default'; } else { + echo 'no default'; continue; } } @@ -122,7 +124,7 @@ foreach ($fieldlist AS $shortname => $field) } else { - $value = $fieldvalues["$shortname"]; + $value = $fieldvalues["field$fieldid"]; } $customfields .= "
$field[name]: "; -- 2.43.5