. #------------------------------ # $Revision: 2643 $ # $Author: al $ # $Date: 2009-06-18 19:06:27 -0400 (Thu, 18 Jun 2009) $ #------------------------------ # This file POSTs data to report_bug.php $g_allow_browser_cache = 1; require_once( 'core.php' ); $t_core_path = config_get( 'core_path' ); require_once( $t_core_path.'file_api.php' ); require_once( $t_core_path.'custom_field_api.php' ); require_once( $t_core_path.'last_visited_api.php' ); $f_master_bug_id = gpc_get_int( 'm_id', 0 ); # this page is invalid for the 'All Project' selection except if this is a clone if ( ( ALL_PROJECTS == helper_get_current_project() ) && ( 0 == $f_master_bug_id ) ) { print_header_redirect( 'login_select_proj_page.php?ref=bug_report_page.php' ); } if ( ADVANCED_ONLY == config_get( 'show_report' ) ) { print_header_redirect ( 'bug_report_advanced_page.php' . ( 0 == $f_master_bug_id ) ? '' : '?m_id=' . $f_master_bug_id ); } if( $f_master_bug_id > 0 ) { # master bug exists... bug_ensure_exists( $f_master_bug_id ); # master bug is not read-only... if ( bug_is_readonly( $f_master_bug_id ) ) { error_parameters( $f_master_bug_id ); trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR ); } $t_bug = bug_prepare_edit( bug_get( $f_master_bug_id, true ) ); # the user can at least update the master bug (needed to add the relationship)... access_ensure_bug_level( config_get( 'update_bug_threshold', null, $t_bug->project_id ), $f_master_bug_id ); #@@@ (thraxisp) Note that the master bug is cloned into the same project as the master, independent of # what the current project is set to. if( $t_bug->project_id != helper_get_current_project() ) { # in case the current project is not the same project of the bug we are viewing... # ... override the current project. This to avoid problems with categories and handlers lists etc. $g_project_override = $t_bug->project_id; $t_changed_project = true; } else { $t_changed_project = false; } access_ensure_project_level( config_get( 'report_bug_threshold' ) ); $f_product_version = $t_bug->version; $f_category = $t_bug->category; $f_reproducibility = $t_bug->reproducibility; $f_severity = $t_bug->severity; $f_priority = $t_bug->priority; $f_summary = $t_bug->summary; $f_description = $t_bug->description; $f_additional_info = $t_bug->additional_information; $f_view_state = $t_bug->view_state; $t_project_id = $t_bug->project_id; } else { access_ensure_project_level( config_get( 'report_bug_threshold' ) ); $f_product_version = gpc_get_string( 'product_version', '' ); $f_category = gpc_get_string( 'category', config_get( 'default_bug_category' ) ); $f_reproducibility = gpc_get_int( 'reproducibility', config_get( 'default_bug_reproducibility' ) ); $f_severity = gpc_get_int( 'severity', config_get( 'default_bug_severity' ) ); $f_priority = gpc_get_int( 'priority', config_get( 'default_bug_priority' ) ); $f_summary = gpc_get_string( 'summary', '' ); $f_description = gpc_get_string( 'description', '' ); $f_additional_info = gpc_get_string( 'additional_info', config_get ( 'default_bug_additional_info' ) ); $f_view_state = gpc_get_int( 'view_state', config_get( 'default_bug_view_status' ) ); $t_project_id = helper_get_current_project(); $t_changed_project = false; } $f_report_stay = gpc_get_bool( 'report_stay', false ); html_page_top1( lang_get( 'report_bug_link' ) ); html_page_top2(); ?>
action="bug_report.php"> > > > > 0 ) ); if ( $t_show_version ) { ?> > > > > > > > 0 ) { ?> > >
0 ? '?m_id=' . $f_master_bug_id : '' ), lang_get( 'advanced_report_link' ) ); } ?>
*', lang_get( 'category' ) ?> project_id, 'name' ) . "] "; } ?>
* type="text" name="summary" size="80" maxlength="128" value="" />
*
*
(' . lang_get( 'max_file_size' ) . ': ' . number_format( $t_max_file_size/1000 ) . 'k)'?> name="file" type="file" size="60" />
' . lang_get( 'bug' ) . ' ' . bug_format_id( $f_master_bug_id ) . '' ?>
* type="submit" class="button" value="" />