. /** * @package MantisBT * @version $Id$ * @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 */ require_once( 'core.php' ); $f_bug_id = gpc_get_int( 'bug_id', 0 ); $f_bugnote_id = gpc_get_int( 'bugnote_id', 0 ); $f_rev_id = gpc_get_int( 'rev_id', 0 ); $t_title = ''; if ( $f_bug_id ) { $t_bug_id = $f_bug_id; $t_bug_data = bug_get( $t_bug_id, true ); $t_bug_revisions = array_reverse( bug_revision_list( $t_bug_id ), true ); $t_title = lang_get( 'issue_id' ) . $t_bug_id; } else if ( $f_bugnote_id ) { $t_bug_id = bugnote_get_field( $f_bugnote_id, 'bug_id' ); $t_bug_data = bug_get( $t_bug_id, true ); $t_bug_revisions = bug_revision_list( $t_bug_id, REV_ANY, $f_bugnote_id ); $t_title = lang_get( 'bugnote' ) . ' ' . $f_bugnote_id; } else if ( $f_rev_id ) { $t_bug_revisions = bug_revision_like( $f_rev_id ); if ( count( $t_bug_revisions ) < 1 ) { trigger_error( ERROR_GENERIC, ERROR ); } $t_bug_id = $t_bug_revisions[$f_rev_id]['bug_id']; $t_bug_data = bug_get( $t_bug_id, true ); $t_title = lang_get( 'issue_id' ) . $t_bug_id; } else { trigger_error( ERROR_GENERIC, ERROR ); } function show_revision( $t_revision ) { static $s_can_drop = null; static $s_drop_token = null; static $s_user_access = null; if ( is_null( $s_can_drop ) ) { $s_can_drop = access_has_bug_level( config_get( 'bug_revision_drop_threshold' ), $t_revision['bug_id'] ); $s_drop_token = form_security_param( 'bug_revision_drop' ); } switch( $t_revision['type'] ) { case REV_DESCRIPTION: $t_label = lang_get( 'description' ); break; case REV_STEPS_TO_REPRODUCE: $t_label = lang_get( 'steps_to_reproduce' ); break; case REV_ADDITIONAL_INFO: $t_label = lang_get( 'additional_information' ); break; case REV_BUGNOTE: if ( is_null( $s_user_access ) ) { $s_user_access = access_has_bug_level( config_get( 'private_bugnote_threshold' ), $t_revision['bug_id'] ); } if ( !$s_user_access ) { return null; } $t_label = lang_get( 'bugnote' ); break; default: $t_label = ''; } $t_by_string = sprintf( lang_get( 'revision_by' ), string_display_line( date( config_get( 'normal_date_format' ), $t_revision['timestamp'] ) ), string_display_line( user_get_name( $t_revision['user_id'] ) ) ); ?> > >
>