Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / view_all_bug_page.php
blob1da40ee6ce9de70d88b9878e878cfd0b935f192c
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 * @package MantisBT
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
20 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
23 * @uses core.php
24 * @uses authentication_api.php
25 * @uses compress_api.php
26 * @uses config_api.php
27 * @uses current_user_api.php
28 * @uses filter_api.php
29 * @uses gpc_api.php
30 * @uses html_api.php
31 * @uses lang_api.php
32 * @uses print_api.php
33 * @uses project_api.php
34 * @uses user_api.php
37 require_once( 'core.php' );
38 require_api( 'authentication_api.php' );
39 require_api( 'compress_api.php' );
40 require_api( 'config_api.php' );
41 require_api( 'current_user_api.php' );
42 require_api( 'filter_api.php' );
43 require_api( 'gpc_api.php' );
44 require_api( 'html_api.php' );
45 require_api( 'lang_api.php' );
46 require_api( 'print_api.php' );
47 require_api( 'project_api.php' );
48 require_api( 'user_api.php' );
50 auth_ensure_user_authenticated();
52 $f_page_number = gpc_get_int( 'page_number', 1 );
54 $t_per_page = null;
55 $t_bug_count = null;
56 $t_page_count = null;
58 $rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true );
59 if ( $rows === false ) {
60 print_header_redirect( 'view_all_set.php?type=0' );
63 $t_bugslist = Array();
64 $t_users_handlers = Array();
65 $t_project_ids = Array();
66 $t_row_count = count( $rows );
67 for($i=0; $i < $t_row_count; $i++) {
68 array_push($t_bugslist, $rows[$i]->id );
69 $t_users_handlers[] = $rows[$i]->handler_id;
70 $t_project_ids[] = $rows[$i]->project_id;
72 user_cache_array_rows( array_unique( $t_users_handlers ) );
73 project_cache_array_rows( array_unique( $t_project_ids ) );
75 gpc_set_cookie( config_get( 'bug_list_cookie' ), implode( ',', $t_bugslist ) );
77 compress_enable();
79 # don't index view issues pages
80 html_robots_noindex();
82 html_page_top1( lang_get( 'view_bugs_link' ) );
84 if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
85 html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
88 html_page_top2();
90 print_recently_visited();
92 include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'view_all_inc.php' );
94 html_page_bottom();