SOAP API: do not try to unserialize an invalid filter
[mantis.git] / bug_actiongroup_ext_page.php
blob46ce9557f4a98a4afd25282e029f063dcb733ac5
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 bug_group_action_api.php
26 * @uses form_api.php
27 * @uses gpc_api.php
28 * @uses print_api.php
29 * @uses string_api.php
30 * @uses utility_api.php
33 /**
34 * MantisBT Core API's
36 require_once( 'core.php' );
37 require_api( 'authentication_api.php' );
38 require_api( 'bug_group_action_api.php' );
39 require_api( 'form_api.php' );
40 require_api( 'gpc_api.php' );
41 require_api( 'print_api.php' );
42 require_api( 'string_api.php' );
43 require_api( 'utility_api.php' );
45 auth_ensure_user_authenticated();
47 $f_action = gpc_get_string( 'action' );
48 $f_bug_arr = gpc_get_int_array( 'bug_arr', array() );
50 # redirect to view issues if nothing is selected
51 if ( is_blank( $f_action ) || ( 0 == count( $f_bug_arr ) ) ) {
52 print_header_redirect( 'view_all_bug_page.php' );
55 # redirect to view issues page if action doesn't have ext_* prefix.
56 # This should only occur if this page is called directly.
57 $t_external_action_prefix = 'EXT_';
58 if ( strpos( $f_action, $t_external_action_prefix ) !== 0 ) {
59 print_header_redirect( 'view_all_bug_page.php' );
62 $t_external_action = utf8_strtolower( utf8_substr( $f_action, utf8_strlen( $t_external_action_prefix ) ) );
63 $t_form_fields_page = 'bug_actiongroup_' . $t_external_action . '_inc.php';
64 $t_form_name = 'bug_actiongroup_' . $t_external_action;
66 bug_group_action_print_top();
69 <br />
71 <div>
72 <form method="post" action="bug_actiongroup_ext.php">
73 <?php echo form_security_field( $t_form_name ); ?>
74 <input type="hidden" name="action" value="<?php echo string_attribute( $t_external_action ) ?>" />
75 <table class="width75" cellspacing="1">
76 <?php
77 bug_group_action_print_title( $t_external_action );
78 bug_group_action_print_hidden_fields( $f_bug_arr );
79 bug_group_action_print_action_fields( $t_external_action );
81 </table>
82 </form>
83 </div>
85 <br />
87 <?php
88 bug_group_action_print_bug_list( $f_bug_arr );
89 bug_group_action_print_bottom();