Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / history_inc.php
bloba857871a885c6d8a343f6a540ca8d13de6ccee99
1 <?php
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/>.
17 /**
18 * This include file prints out the bug history
19 * $f_bug_id must already be defined
21 * @package MantisBT
22 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
23 * @copyright Copyright (C) 2002 - 2010 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
31 * @uses lang_api.php
32 * @uses print_api.php
33 * @uses string_api.php
36 require_api( 'access_api.php' );
37 require_api( 'collapse_api.php' );
38 require_api( 'config_api.php' );
39 require_api( 'helper_api.php' );
40 require_api( 'history_api.php' );
41 require_api( 'lang_api.php' );
42 require_api( 'print_api.php' );
43 require_api( 'string_api.php' );
45 $t_access_level_needed = config_get( 'view_history_threshold' );
46 if ( !access_has_bug_level( $t_access_level_needed, $f_bug_id ) ) {
47 return;
51 <a name="history" id="history" /><br />
53 <?php
54 collapse_open( 'history' );
55 $t_history = history_get_events_array( $f_bug_id );
57 <table class="width100" cellspacing="0">
58 <tr>
59 <td class="form-title" colspan="4">
60 <?php
61 collapse_icon( 'history' );
62 echo lang_get( 'bug_history' ) ?>
63 </td>
64 </tr>
65 <tr class="row-category-history">
66 <td class="small-caption">
67 <?php echo lang_get( 'date_modified' ) ?>
68 </td>
69 <td class="small-caption">
70 <?php echo lang_get( 'username' ) ?>
71 </td>
72 <td class="small-caption">
73 <?php echo lang_get( 'field' ) ?>
74 </td>
75 <td class="small-caption">
76 <?php echo lang_get( 'change' ) ?>
77 </td>
78 </tr>
79 <?php
80 foreach ( $t_history as $t_item ) {
82 <tr <?php echo helper_alternate_class() ?>>
83 <td class="small-caption">
84 <?php echo $t_item['date'] ?>
85 </td>
86 <td class="small-caption">
87 <?php print_user( $t_item['userid'] ) ?>
88 </td>
89 <td class="small-caption">
90 <?php echo string_display( $t_item['note'] ) ?>
91 </td>
92 <td class="small-caption">
93 <?php echo ( $t_item['raw'] ? string_display_line_links( $t_item['change'] ) : $t_item['change'] ) ?>
94 </td>
95 </tr>
96 <?php
97 } # end for loop
99 </table>
100 <?php
101 collapse_closed( 'history' );
103 <table class="width100" cellspacing="0">
104 <tr>
105 <td class="form-title" colspan="4">
106 <?php collapse_icon( 'history' );
107 echo lang_get( 'bug_history' ) ?>
108 </td>
109 </tr>
110 </table>
112 <?php
113 collapse_end( 'history' );