]>
src.bluestatic.org Git - bugdar.git/blob - showhistory.php
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(
18 define('SVN', '$Id$');
20 $focus['showreport
'] = 'focus
';
22 require_once('./global.php
');
24 $bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . intval($bugsys->in['bugid
']));
27 $message->error($lang->getlex('error_invalid_id
'));
30 if (($bug['hidden
'] AND !can_perform('canviewhidden
', $bug['productid
'])) OR !can_perform('canviewbugs
', $bug['productid
']))
32 $message->error_permission();
35 // ###################################################################
37 $customfields = $db->query("
39 FROM " . TABLE_PREFIX . "bugfield AS bugfield
40 LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
41 ON (bugfield.fieldid = permission.fieldid)
42 WHERE permission.mask <> 0
43 AND permission.usergroupid = {$bugsys->userinfo['usergroupid']}"
46 while ($field = $db->fetch_array($customfields))
48 $fieldlist["custom_field$field[fieldid]"] = 'custom_field
' . $field['fieldid
'] . " (\"$field[name]\")";
51 // ###################################################################
53 $logs_fetch = $db->query("
54 SELECT history.*, user.userid, user.email, user.displayname, user.showemail
55 FROM " . TABLE_PREFIX . "history AS history
56 LEFT JOIN " . TABLE_PREFIX . "user AS user
57 ON (user.userid = history.userid)
58 WHERE bugid = $bug[bugid]"
60 while ($log = $db->fetch_array($logs_fetch))
62 $log['date
'] = $datef->format($bugsys->options['dateformat
'], $log['dateline
']);
63 $log['user
'] = construct_user_display($log);
65 $logs["$log[dateline]"]["$log[historyid]"] = $log;
66 ksort($logs["$log[dateline]"]);
71 foreach ($logs AS $dateline => $logitems)
73 $show['group
'] = true;
75 foreach ($logitems AS $log)
77 $funct->exec_swap_bg('', $stylevar['alt_colour
']);
78 $bgcolour = $funct->bgcolour;
80 if ($newlog = $fieldlist["$log[field]"])
82 $log['field
'] = $newlog;
85 eval('$history .= "' . $template->fetch('history_bit') . '";');
86 $show['group
'] = false;
90 eval('$template->flush("' . $template->fetch('history') . '");');
92 /*=====================================================================*\
93 || ###################################################################
96 || ###################################################################
97 \*=====================================================================*/