2 # MantisBT - A PHP based bugtracking system
4 # MantisBT is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # MantisBT is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
18 * This include file prints out the bug history
19 * $f_bug_id must already be defined
22 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
23 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
24 * @link http://www.mantisbt.org
26 * @uses access_api.php
27 * @uses collapse_api.php
28 * @uses config_api.php
29 * @uses helper_api.php
30 * @uses history_api.php
33 * @uses string_api.php
36 if ( !defined( 'HISTORY_INC_ALLOW' ) ) {
40 require_api( 'access_api.php' );
41 require_api( 'collapse_api.php' );
42 require_api( 'config_api.php' );
43 require_api( 'helper_api.php' );
44 require_api( 'history_api.php' );
45 require_api( 'lang_api.php' );
46 require_api( 'print_api.php' );
47 require_api( 'string_api.php' );
49 $t_access_level_needed = config_get( 'view_history_threshold' );
50 if ( !access_has_bug_level( $t_access_level_needed, $f_bug_id ) ) {
55 <a id
="history"></a
><br
/>
58 collapse_open( 'history' );
59 $t_history = history_get_events_array( $f_bug_id );
61 <table
class="width100" cellspacing
="0">
63 <td
class="form-title" colspan
="4">
65 collapse_icon( 'history' );
66 echo lang_get( 'bug_history' ) ?
>
69 <tr
class="row-category-history">
70 <td
class="small-caption">
71 <?php
echo lang_get( 'date_modified' ) ?
>
73 <td
class="small-caption">
74 <?php
echo lang_get( 'username' ) ?
>
76 <td
class="small-caption">
77 <?php
echo lang_get( 'field' ) ?
>
79 <td
class="small-caption">
80 <?php
echo lang_get( 'change' ) ?
>
84 foreach ( $t_history as $t_item ) {
86 <tr
<?php
echo helper_alternate_class() ?
>>
87 <td
class="small-caption">
88 <?php
echo $t_item['date'] ?
>
90 <td
class="small-caption">
91 <?php
print_user( $t_item['userid'] ) ?
>
93 <td
class="small-caption">
94 <?php
echo string_display( $t_item['note'] ) ?
>
96 <td
class="small-caption">
97 <?php
echo ( $t_item['raw'] ?
string_display_line_links( $t_item['change'] ) : $t_item['change'] ) ?
>
105 collapse_closed( 'history' );
107 <table
class="width100" cellspacing
="0">
109 <td
class="form-title" colspan
="4">
110 <?php
collapse_icon( 'history' );
111 echo lang_get( 'bug_history' ) ?
>
117 collapse_end( 'history' );