INT));
$bug = $DB_sql->query_first("
SELECT bug.*, user.displayname, user.email, user.showemail
FROM " . TABLE_PREFIX . "bug AS bug
LEFT JOIN " . TABLE_PREFIX . "user AS user
ON (bug.userid = user.userid)
WHERE bug.bugid = $vars[bugid]"
);
if (!is_array($bug))
{
echo 'alert: bad bug';
exit;
}
echo "
Bug ID: $bug[bugid]
";
echo "Reported by: " . construct_user_display($bug) . "
";
echo "Product: " . $bugsys->datastore['product']["$bug[productid]"]['title'] . iff($bug['componentid'], ' / Component:' . $bugsys->datastore['product']["$bug[componentid]"]['title'] . '') . ' / Version: ' . $bugsys->datastore['version']["$bug[versionid]"]['version'] . "
";
echo "Title / summary: $bug[summary]
";
echo "Status: " . $bugsys->datastore['status']["$bug[status]"]['status'] . " / Resolution: " . $bugsys->datastore['resolution']["$bug[resolution]"]['resolution'] . "
";
echo "Severity: " . $bugsys->datastore['severity']["$bug[severity]"]['severity'] . "
";
echo "Priority: " . $bugsys->datastore['priority']["$bug[priority]"]['priority'] . "
";
$assigninfo = $bugsys->datastore['assignto']["$bug[assignedto]"];
echo iff(is_array($assigninfo), "Assigned to: " . construct_user_display($assigninfo) . "
");
if (((can_perform('caneditown') AND $bugsys->userinfo['userid'] == $comment['userid']) OR can_perform('caneditothers')) AND can_perform('caneditinfo'))
{
echo '';
}
echo '
';
$comments = $DB_sql->query("
SELECT comment.*, user.email, user.showemail, user.displayname
FROM " . TABLE_PREFIX . "comment AS comment
LEFT JOIN " . TABLE_PREFIX . "user AS user
ON (comment.userid = user.userid)
WHERE comment.bugid = $vars[bugid]
ORDER BY comment.dateline ASC"
);
while ($comment = $DB_sql->fetch_array($comments))
{
echo '' . datelike('standard', $comment['dateline']) . '' . construct_user_display($comment) . " |
";
echo "" . $comment['comment_parsed'] . " |
";
if ((can_perform('caneditown') AND $bugsys->userinfo['userid'] == $comment['userid']) OR can_perform('caneditothers'))
{
echo "[Edit Comment] |
";
}
echo "
";
}
if (can_perform('canpostcomments'))
{
echo "";
}
/*print_r($bug);
print_r($comments);*/
}
/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
|| # $Id$
|| ###################################################################
\*=====================================================================*/
?>