SOAP API: do not try to unserialize an invalid filter
[mantis.git] / view_all_bug_page.php
blobdf2ec5e1742c587035312976e6d7ad8d808f9709
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 - 2011 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 /**
38 * MantisBT Core API's
40 require_once( 'core.php' );
41 require_api( 'authentication_api.php' );
42 require_api( 'compress_api.php' );
43 require_api( 'config_api.php' );
44 require_api( 'current_user_api.php' );
45 require_api( 'filter_api.php' );
46 require_api( 'gpc_api.php' );
47 require_api( 'html_api.php' );
48 require_api( 'lang_api.php' );
49 require_api( 'print_api.php' );
50 require_api( 'project_api.php' );
51 require_api( 'user_api.php' );
53 require_js( 'bugFilter.js' );
54 require_css( 'status_config.php' );
56 auth_ensure_user_authenticated();
58 $f_page_number = gpc_get_int( 'page_number', 1 );
60 $t_per_page = null;
61 $t_bug_count = null;
62 $t_page_count = null;
64 $rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true );
65 if ( $rows === false ) {
66 print_header_redirect( 'view_all_set.php?type=0' );
69 $t_bugslist = Array();
70 $t_users_handlers = Array();
71 $t_project_ids = Array();
72 $t_row_count = count( $rows );
73 for($i=0; $i < $t_row_count; $i++) {
74 array_push($t_bugslist, $rows[$i]->id );
75 $t_users_handlers[] = $rows[$i]->handler_id;
76 $t_project_ids[] = $rows[$i]->project_id;
78 $t_unique_users_handlers = array_unique( $t_users_handlers );
79 $t_unique_project_ids = array_unique( $t_project_ids );
80 user_cache_array_rows( $t_unique_users_handlers );
81 project_cache_array_rows( $t_unique_project_ids );
83 gpc_set_cookie( config_get( 'bug_list_cookie' ), implode( ',', $t_bugslist ) );
85 compress_enable();
87 # don't index view issues pages
88 html_robots_noindex();
90 html_page_top1( lang_get( 'view_bugs_link' ) );
92 if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
93 html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
96 html_page_top2();
98 print_recently_visited();
100 define( 'VIEW_ALL_INC_ALLOW', true );
101 include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'view_all_inc.php' );
103 html_page_bottom();