2 /*=====================================================================*\
3 || ################################################################### ||
4 || # BugStrike [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
13 $fetchtemplates = array(
19 require_once('./global.php');
21 $bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX
. "bug WHERE bugid = " . intval($bugsys->in
['bugid']));
24 $message->error('alert: bad bug');
27 // ###################################################################
29 $logs_fetch = $db->query("
30 SELECT history.*, user.userid, user.email, user.displayname, user.showemail
31 FROM " . TABLE_PREFIX
. "history AS history
32 LEFT JOIN " . TABLE_PREFIX
. "user AS user
33 ON (user.userid = history.userid)
34 WHERE bugid = $bug[bugid]"
36 while ($log = $db->fetch_array($logs_fetch))
38 $log['formatted'] = call_user_func_array('phrase', array_merge(array($log['language']), unserialize($log['arguments'])));
39 $log['date'] = datelike('standard', $log['dateline']);
40 $log['user'] = construct_user_display($log);
42 $logs["$log[dateline]"]["$log[historyid]"] = $log;
43 ksort($logs["$log[dateline]"]);
48 foreach ($logs AS $dateline => $logitems)
52 $show['changes'] = false
;
54 foreach ($logitems AS $log)
56 $hasvalues = ((empty($log['original']) AND empty($log['changed'])) ? false
: true
);
57 $show['changes'] = (($hasvalues) ? true
: $show['changes']);
62 eval('$changes .= "' . $template->fetch('history_bit') . '";');
65 if (!in_array($log['formatted'], $messages))
67 $messages[] = $log['formatted'];
71 $log['messages'] = implode("</div>\n<div>", $messages);
73 eval('$history .= "' . $template->fetch('history_group') . '";');
76 eval('$template->flush("' . $template->fetch('history') . '");');
78 /*=====================================================================*\
79 || ###################################################################
82 || ###################################################################
83 \*=====================================================================*/