.
/**
* @package MantisBT
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2013 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
$g_allow_browser_cache = 1;
require_once( 'core.php' );
require_once( 'ajax_api.php' );
require_once( 'bug_api.php' );
require_once( 'custom_field_api.php' );
require_once( 'date_api.php' );
require_once( 'last_visited_api.php' );
require_once( 'projax_api.php' );
$f_bug_id = gpc_get_int( 'bug_id' );
$tpl_bug = bug_get( $f_bug_id, true );
if ( $tpl_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 = $tpl_bug->project_id;
$tpl_changed_project = true;
} else {
$tpl_changed_project = false;
}
if ( bug_is_readonly( $f_bug_id ) ) {
error_parameters( $f_bug_id );
trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
}
access_ensure_bug_level( config_get( 'update_bug_threshold' ), $f_bug_id );
html_page_top( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) );
print_recently_visited();
$t_fields = config_get( 'bug_update_page_fields' );
$t_fields = columns_filter_disabled( $t_fields );
$tpl_bug_id = $f_bug_id;
$t_action_button_position = config_get( 'action_button_position' );
$tpl_top_buttons_enabled = $t_action_button_position == POSITION_TOP || $t_action_button_position == POSITION_BOTH;
$tpl_bottom_buttons_enabled = $t_action_button_position == POSITION_BOTTOM || $t_action_button_position == POSITION_BOTH;
$tpl_show_id = in_array( 'id', $t_fields );
$tpl_show_project = in_array( 'project', $t_fields );
$tpl_show_category = in_array( 'category_id', $t_fields );
$tpl_show_view_state = in_array( 'view_state', $t_fields );
$tpl_view_state = $tpl_show_view_state ? string_display_line( get_enum_element( 'view_state', $tpl_bug->view_state ) ) : '';
$tpl_show_date_submitted = in_array( 'date_submitted', $t_fields );
$tpl_show_last_updated = in_array( 'last_updated', $t_fields );
$tpl_show_reporter = in_array( 'reporter', $t_fields );
$tpl_show_handler = in_array( 'handler', $t_fields );
$tpl_show_priority = in_array( 'priority', $t_fields );
$tpl_show_severity = in_array( 'severity', $t_fields );
$tpl_show_reproducibility = in_array( 'reproducibility', $t_fields );
$tpl_show_status = in_array( 'status', $t_fields );
$tpl_show_resolution = in_array( 'resolution', $t_fields );
$tpl_show_projection = in_array( 'projection', $t_fields ) && config_get( 'enable_projection' ) == ON;
$tpl_show_eta = in_array( 'eta', $t_fields ) && config_get( 'enable_eta' ) == ON;
$t_show_profiles = config_get( 'enable_profiles' ) == ON;
$tpl_show_platform = $t_show_profiles && in_array( 'platform', $t_fields );
$tpl_show_os = $t_show_profiles && in_array( 'os', $t_fields );
$tpl_show_os_version = $t_show_profiles && in_array( 'os_version', $t_fields );
$tpl_show_versions = version_should_show_product_version( $tpl_bug->project_id );
$tpl_show_product_version = $tpl_show_versions && in_array( 'product_version', $t_fields );
$tpl_show_product_build = $tpl_show_versions && in_array( 'product_build', $t_fields ) && ( config_get( 'enable_product_build' ) == ON );
$tpl_product_build_attribute = $tpl_show_product_build ? string_attribute( $tpl_bug->build ) : '';
$tpl_show_target_version = $tpl_show_versions && in_array( 'target_version', $t_fields ) && access_has_bug_level( config_get( 'roadmap_update_threshold' ), $tpl_bug_id );
$tpl_show_fixed_in_version = $tpl_show_versions && in_array( 'fixed_in_version', $t_fields );
$tpl_show_due_date = in_array( 'due_date', $t_fields ) && access_has_bug_level( config_get( 'due_date_view_threshold' ), $tpl_bug_id );
$tpl_show_summary = in_array( 'summary', $t_fields );
$tpl_summary_attribute = $tpl_show_summary ? string_attribute( $tpl_bug->summary ) : '';
$tpl_show_description = in_array( 'description', $t_fields );
$tpl_description_textarea = $tpl_show_description ? string_textarea( $tpl_bug->description ) : '';
$tpl_show_additional_information = in_array( 'additional_info', $t_fields );
$tpl_additional_information_textarea = $tpl_show_additional_information ? string_textarea( $tpl_bug->additional_information ) : '';
$tpl_show_steps_to_reproduce = in_array( 'steps_to_reproduce', $t_fields );
$tpl_steps_to_reproduce_textarea = $tpl_show_steps_to_reproduce ? string_textarea( $tpl_bug->steps_to_reproduce ) : '';
$tpl_handler_name = string_display_line( user_get_name( $tpl_bug->handler_id ) );
$tpl_can_change_view_state = $tpl_show_view_state && access_has_project_level( config_get( 'change_view_status_threshold' ) );
if ( $tpl_show_product_version ) {
$tpl_product_version_released_mask = VERSION_RELEASED;
if ( access_has_project_level( config_get( 'report_issues_for_unreleased_versions_threshold' ) ) ) {
$tpl_product_version_released_mask = VERSION_ALL;
}
}
$tpl_formatted_bug_id = $tpl_show_id ? bug_format_id( $f_bug_id ) : '';
$tpl_project_name = $tpl_show_project ? string_display_line( project_get_name( $tpl_bug->project_id ) ) : '';
echo '
';
echo '