INT, 'hilight' => STR)); $bug = $db->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; } // ------------------------------------------------------------------- // prep display $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; } // ------------------------------------------------------------------- // hilight $words = explode(' ', $vars['hilight']); foreach ($words AS $word) { if (trim($word)) { $word = preg_quote($word); $hilight[] = $temp = trim(preg_replace('#[^0-9a-zA-Z_ ]#', '', $word)); } } print_r($words); print_r($hilight); // ------------------------------------------------------------------- // get comments $comments_fetch = $db->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->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; } if (is_array($hilight)) { foreach ($hilight AS $id => $find) { $find = "#($find)#"; $replace = "\\1"; $comment['comment_parsed'] = preg_replace($find, $replace, $comment['comment_parsed']); } } eval('$comments .= "' . $template->fetch('showreport_comment') . '";'); } if (can_perform('canpostcomments')) { $show['newreply'] = true; } else { $show['newreply'] = false; } if (is_array($hilight)) { foreach ($hilight AS $id => $find) { $find = "#($find)#"; $replace = "\\1"; $bug['summary'] = preg_replace($find, $replace, $bug['summary']); } } eval('$template->flush("' . $template->fetch('SHOWREPORT') . '");'); /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>