$show['editreport'] = ((((can_perform('caneditown') AND $bugsys->userinfo['userid'] == $comment['userid']) OR can_perform('caneditothers')) AND can_perform('caneditinfo')) ? true : false);
+// -------------------------------------------------------------------
+// custom fields
+$customfields = '';
+
+$allfields = $db->query("SELECT * FROM " . TABLE_PREFIX . "bugfield");
+while ($field = $db->fetch_array($allfields))
+{
+ $fieldlist["$field[shortname]"] = $field;
+}
+
+$fieldvalues = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bugvaluefill WHERE bugid = $bug[bugid]");
+
+foreach ($fieldvalues AS $shortname => $value)
+{
+ if ($shortname == 'bugid')
+ {
+ continue;
+ }
+
+ $field =& $fieldlist["$shortname"];
+
+ $customfields .= "<div><strong>$field[name]:</strong> ";
+
+ if ($value == '')
+ {
+ $value = $field['defaultvalue'];
+ }
+
+ if ($field['type'] == 'input_text' OR $field['type'] == 'textarea')
+ {
+ $customfields .= $value;
+ }
+ else if ($field['type'] == 'input_checkbox')
+ {
+ $customfields .= (($value) ? 'True' : 'False');
+ }
+ else
+ {
+ $temp = unserialize($field['selects']);
+ $customfields .= $temp["$value"];
+ }
+ $customfields .= "</div>\n\n";
+}
+
// -------------------------------------------------------------------
// hilight
$words = explode(' ', $bugsys->in['hilight']);
<div><strong>Priority:</strong> $bug[priority]</div>
<if condition="$bug['assigninfo']"><div><strong>Assigned to:</strong> $bug[assigninfo]</div></if>
+$customfields
+
<div>[<a href="showhistory.php?bugid=$bug[bugid]">Show Bug History</a>]<if condition="$show['editreport']"> [<a href="editreport.php?bugid=$bug[bugid]">Edit Bug Report</a>]</if></div>
<br />