. /** * Allows the user to select a project that is visible to him * @package MantisBT * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org * @copyright Copyright (C) 2002 - 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org */ /** * MantisBT Core API's */ require_once( 'core.php' ); auth_ensure_user_authenticated(); $f_ref = string_sanitize_url( gpc_get_string( 'ref', '' ) ); if ( count( current_user_get_accessible_projects() ) == 1) { $t_project_ids = current_user_get_accessible_projects(); $t_project_id = (int) $t_project_ids[0]; if ( count( current_user_get_accessible_subprojects( $t_project_id ) ) == 0 ) { $t_ref_urlencoded = string_url( $f_ref ); print_header_redirect( "set_project.php?project_id=$t_project_id&ref=$t_ref_urlencoded", true); /* print_header_redirect terminates script execution */ } } html_page_top( lang_get( 'select_project_button' ) ); ?>