1.1.1
by Hilko Bengen
Import upstream version 0.19.0 |
1 |
<?php
|
1.1.11
by Dario Minnucci
Import upstream version 1.2.4 |
2 |
# MantisBT - a php based bugtracking system
|
3 |
||
4 |
# MantisBT is free software: you can redistribute it and/or modify
|
|
1.1.8
by Patrick Schoenfeld
Import upstream version 1.1.2+dfsg |
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.
|
|
8 |
#
|
|
1.1.11
by Dario Minnucci
Import upstream version 1.2.4 |
9 |
# MantisBT is distributed in the hope that it will be useful,
|
1.1.8
by Patrick Schoenfeld
Import upstream version 1.1.2+dfsg |
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.
|
|
13 |
#
|
|
14 |
# You should have received a copy of the GNU General Public License
|
|
1.1.11
by Dario Minnucci
Import upstream version 1.2.4 |
15 |
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
|
16 |
||
17 |
/**
|
|
18 |
* @package MantisBT
|
|
19 |
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
|
|
1.1.12
by Silvia Alvarez
Import upstream version 1.2.6 |
20 |
* @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
|
1.1.11
by Dario Minnucci
Import upstream version 1.2.4 |
21 |
* @link http://www.mantisbt.org
|
22 |
*/
|
|
23 |
/**
|
|
24 |
* MantisBT Core API's
|
|
25 |
*/
|
|
1.1.8
by Patrick Schoenfeld
Import upstream version 1.1.2+dfsg |
26 |
require_once( 'core.php' ); |
27 |
||
1.1.9
by Patrick Schoenfeld
Import upstream version 1.1.6+dfsg |
28 |
form_security_validate( 'manage_proj_user_copy' ); |
29 |
||
1.1.8
by Patrick Schoenfeld
Import upstream version 1.1.2+dfsg |
30 |
auth_reauthenticate(); |
31 |
||
1.1.5
by Patrick Schoenfeld
Import upstream version 1.0.6+dfsg |
32 |
$f_project_id = gpc_get_int( 'project_id' ); |
33 |
$f_other_project_id = gpc_get_int( 'other_project_id' ); |
|
34 |
$f_copy_from = gpc_get_bool( 'copy_from' ); |
|
35 |
$f_copy_to = gpc_get_bool( 'copy_to' ); |
|
36 |
||
37 |
if ( $f_copy_from ) { |
|
38 |
$t_src_project_id = $f_other_project_id; |
|
39 |
$t_dst_project_id = $f_project_id; |
|
40 |
} else if ( $f_copy_to ) { |
|
41 |
$t_src_project_id = $f_project_id; |
|
42 |
$t_dst_project_id = $f_other_project_id; |
|
43 |
} else { |
|
1.1.11
by Dario Minnucci
Import upstream version 1.2.4 |
44 |
/** @todo Should this become a separate error? */
|
1.1.5
by Patrick Schoenfeld
Import upstream version 1.0.6+dfsg |
45 |
trigger_error( ERROR_CATEGORY_NO_ACTION, ERROR ); |
46 |
}
|
|
1.1.1
by Hilko Bengen
Import upstream version 0.19.0 |
47 |
|
48 |
# We should check both since we are in the project section and an
|
|
49 |
# admin might raise the first threshold and not realize they need
|
|
50 |
# to raise the second
|
|
1.1.5
by Patrick Schoenfeld
Import upstream version 1.0.6+dfsg |
51 |
access_ensure_project_level( config_get( 'manage_project_threshold' ), $t_dst_project_id ); |
52 |
access_ensure_project_level( config_get( 'project_user_threshold' ), $t_dst_project_id ); |
|
1.1.1
by Hilko Bengen
Import upstream version 0.19.0 |
53 |
|
1.1.11
by Dario Minnucci
Import upstream version 1.2.4 |
54 |
project_copy_users( $t_dst_project_id, $t_src_project_id, access_get_project_level( $t_dst_project_id ) ); |
1.1.1
by Hilko Bengen
Import upstream version 0.19.0 |
55 |
|
1.1.9
by Patrick Schoenfeld
Import upstream version 1.1.6+dfsg |
56 |
form_security_purge( 'manage_proj_user_copy' ); |
57 |
||
1.1.1
by Hilko Bengen
Import upstream version 0.19.0 |
58 |
print_header_redirect( 'manage_proj_edit_page.php?project_id=' . $f_project_id ); |