2 /*=====================================================================*\
3 || ################################################################### ||
4 || # Renapsus [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # All parts of this file are ©2003-[#]year[#] Iris Studios, Inc. No # ||
7 || # part of this file may be reproduced in any way: part or whole. # ||
8 || # --------------------------------------------------------------- # ||
9 || # ©2003 - [#]year[#] Iris Studios, Inc. | http://www.iris-studios.com # ||
10 || ################################################################### ||
11 \*=====================================================================*/
13 $fetchtemplates = array(
18 require_once('./global.php');
20 if (!can_perform('canviewbugs'))
26 // ###################################################################
28 sanitize(array('bugid' => INT));
30 $bug = $DB_sql->query_first("
31 SELECT bug.*, user.displayname, user.email, user.showemail
32 FROM " . TABLE_PREFIX
. "bug AS bug
33 LEFT JOIN " . TABLE_PREFIX
. "user AS user
34 ON (bug.userid = user.userid)
35 WHERE bug.bugid = $vars[bugid]"
40 echo 'alert: bad bug';
44 $bug['userinfo'] = construct_user_display($bug);
45 $bug['product'] = $bugsys->datastore
['product']["$bug[productid]"]['title'];
46 $bug['component'] = iff($bug['componentid'], $bugsys->datastore
['product']["$bug[componentid]"]['title']);
47 $bug['version'] = $bugsys->datastore
['version']["$bug[versionid]"]['version'];
48 $bug['status'] = $bugsys->datastore
['status']["$bug[status]"]['status'];
49 $bug['resolution'] = $bugsys->datastore
['resolution']["$bug[resolution]"]['resolution'];
50 $bug['severity'] = $bugsys->datastore
['severity']["$bug[severity]"]['severity'];
51 $bug['priority'] = $bugsys->datastore
['priority']["$bug[priority]"]['priority'];
53 $assigninfo = $bugsys->datastore
['assignto']["$bug[assignedto]"];
54 $bug['assigninfo'] = iff(is_array($assigninfo), construct_user_display($assigninfo));
56 if (((can_perform('caneditown') AND $bugsys->userinfo
['userid'] == $comment['userid']) OR can_perform('caneditothers')) AND can_perform('caneditinfo'))
58 $show['editreport'] = true
;
62 $show['editreport'] = false
;
65 $comments_fetch = $DB_sql->query("
66 SELECT comment.*, user.email, user.showemail, user.displayname
67 FROM " . TABLE_PREFIX
. "comment AS comment
68 LEFT JOIN " . TABLE_PREFIX
. "user AS user
69 ON (comment.userid = user.userid)
70 WHERE comment.bugid = $vars[bugid]
71 ORDER BY comment.dateline ASC"
73 while ($comment = $DB_sql->fetch_array($comments_fetch))
75 $comment['posttime'] = datelike('standard', $comment['dateline']);
76 $comment['postby'] = construct_user_display($comment);
77 if ((can_perform('caneditown') AND $bugsys->userinfo
['userid'] == $comment['userid']) OR can_perform('caneditothers'))
79 $show['editcomment'] = true
;
83 $show['editcomment'] = false
;
85 eval('$comments .= "' . $tpl->fetch('showreport_comment') . '";');
88 if (can_perform('canpostcomments'))
90 $show['newreply'] = true
;
94 $show['newreply'] = false
;
97 eval('$tpl->flush("' . $tpl->fetch('SHOWREPORT') . '");');
99 /*=====================================================================*\
100 || ###################################################################
103 || ###################################################################
104 \*=====================================================================*/