userinfo['permissions'] & CANVIEWBUGS)) { echo 'no permission'; exit; } // ################################################################### if (empty($_REQUEST['do'])) { $_REQUEST['do'] = 'modify'; } // ################################################################### if ($_REQUEST['do'] == 'modify') { sanitize(array('bugid' => INT)); if (!$vars['bugid']) { echo 'alert: bad bug'; exit; } $bugfetch = $DB_sql->query(" SELECT bug.*, user1.displayname, user1.email, user1.showemail, comment.userid AS posterid, user2.displayname AS postedby, user2.email AS posteremail, user2.showemail AS postershowemail, comment.comment, comment.dateline AS postedon FROM " . TABLE_PREFIX . "bug AS bug LEFT JOIN " . TABLE_PREFIX . "comment AS comment ON (bug.bugid = comment.bugid) LEFT JOIN " . TABLE_PREFIX . "user AS user1 ON (bug.userid = user1.userid) LEFT JOIN " . TABLE_PREFIX . "user AS user2 ON (comment.userid = user1.userid) WHERE bug.bugid = $vars[bugid] ORDER BY comment.dateline ASC" ); while ($buginfo = $DB_sql->fetch_array($bugfetch)) { if (!is_array($bug)) { $bug = array( 'bugid' => $buginfo['bugid'], 'userid' => $buginfo['userid'], 'displayname' => $buginfo['displayname'], 'email' => $buginfo['email'], 'showemail' => $buginfo['showemail'], 'productid' => $buginfo['productid'], 'componentid' => $buginfo['componentid'], 'versionid' => $buginfo['versionid'], 'summary' => $buginfo['summary'], 'priority' => $buginfo['priority'], 'severity' => $buginfo['severity'], 'status' => $buginfo['status'], 'resolution' => $buginfo['resolution'], 'assignedto' => $buginfo['assignedto'] ); } $comments[] = array( 'userid' => $buginfo['posterid'], 'displayname' => $buginfo['displayname'], 'email' => $buginfo['posteremail'], 'showemail' => $buginfo['postershowemail'], 'dateline' => $buginfo['postedon'], 'comment' => $buginfo['comment'] ); } if (!is_array($bug)) { echo 'alert: bad bug'; exit; } echo "
Bug ID: $bug[bugid]
"; echo "
Reported by: $bug[displayname]" . iff($bug['showemail'], " <$bug[email]>") . " (userid: $bug[userid])
"; 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: " . $assigninfo['displayname'] . iff($assigninfo['showemail'], " <$assigninfo[email]>") . " (userid: $assigninfo[userid])
"); echo '
'; foreach ($comments AS $comment) { echo '"; echo "
' . datelike('standard', $comment['dateline']) . '' . $comment['displayname'] . iff($comment['showemail'], " <$comment[email]>") . " (userid: $comment[userid])
" . nl2br($comment['comment']) . "
"; } if ($bugsys->userinfo['permissions'] & CANPOSTCOMMENTS) { echo "
[New Comment]
"; } /*print_r($bug); print_r($comments);*/ } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>