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 echo 'alert: bad bug';
28 // ###################################################################
30 $logs_fetch = $db->query("
31 SELECT history.*, user.userid, user.email, user.displayname, user.showemail
32 FROM " . TABLE_PREFIX
. "history AS history
33 LEFT JOIN " . TABLE_PREFIX
. "user AS user
34 ON (user.userid = history.userid)
35 WHERE bugid = $bug[bugid]"
37 while ($log = $db->fetch_array($logs_fetch))
39 $log['formatted'] = call_user_func_array('phrase', array_merge(array($log['language']), unserialize($log['arguments'])));
40 $log['date'] = datelike('standard', $log['dateline']);
41 $log['user'] = construct_user_display($log);
43 $logs["$log[dateline]"]["$log[historyid]"] = $log;
44 ksort($logs["$log[dateline]"]);
49 foreach ($logs AS $dateline => $logitems)
53 $show['changes'] = false
;
55 foreach ($logitems AS $log)
57 $hasvalues = ((empty($log['original']) AND empty($log['changed'])) ? false
: true
);
58 $show['changes'] = (($hasvalues) ? true
: $show['changes']);
63 eval('$changes .= "' . $template->fetch('history_bit') . '";');
66 if (!in_array($log['formatted'], $messages))
68 $messages[] = $log['formatted'];
72 $log['messages'] = implode("</div>\n<div>", $messages);
74 eval('$history .= "' . $template->fetch('history_group') . '";');
77 eval('$template->flush("' . $template->fetch('history') . '");');
79 /*=====================================================================*\
80 || ###################################################################
83 || ###################################################################
84 \*=====================================================================*/