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; } $bug['userinfo'] = construct_user_display($bug); $bug['product'] = $bugsys->datastore['product']["$bug[productid]"]['title']; $bug['component'] = iff($bug['componentid'], $bugsys->datastore['product']["$bug[componentid]"]['title']); $bug['version'] = $bugsys->datastore['version']["$bug[versionid]"]['version']; $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status']; $bug['resolution'] = $bugsys->datastore['resolution']["$bug[resolution]"]['resolution']; $bug['severity'] = $bugsys->datastore['severity']["$bug[severity]"]['severity']; $bug['priority'] = $bugsys->datastore['priority']["$bug[priority]"]['priority']; $assigninfo = $bugsys->datastore['assignto']["$bug[assignedto]"]; $bug['assigninfo'] = iff(is_array($assigninfo), construct_user_display($assigninfo)); if (((can_perform('caneditown') AND $bugsys->userinfo['userid'] == $comment['userid']) OR can_perform('caneditothers')) AND can_perform('caneditinfo')) { $show['editreport'] = true; } else { $show['editreport'] = false; } $comments_fetch = $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_fetch)) { $comment['posttime'] = datelike('standard', $comment['dateline']); $comment['postby'] = construct_user_display($comment); if ((can_perform('caneditown') AND $bugsys->userinfo['userid'] == $comment['userid']) OR can_perform('caneditothers')) { $show['editcomment'] = true; } else { $show['editcomment'] = false; } eval('$comments .= "' . $tpl->fetch('showreport_comment') . '";'); } if (can_perform('canpostcomments')) { $show['newreply'] = true; } else { $show['newreply'] = false; } eval('$tpl->flush("' . $tpl->fetch('SHOWREPORT') . '");'); /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>