Skip to content

Commit

Permalink
Fix #11403: Bugnote ID not formatted correctly in history (view status)
Browse files Browse the repository at this point in the history
When changing the view state of a bugnote, the history item added looks
something like:

Note View State: private: 214

Note that the bugnote ID 214 is not properly formatted. It should be
showing something like this instead:

Note View State: 0000214: private
  • Loading branch information
davidhicks committed Jan 17, 2010
1 parent 2c8f64b commit b9bd739
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/bugnote_api.php
Expand Up @@ -559,7 +559,7 @@ function bugnote_set_view_state( $p_bugnote_id, $p_private ) {
WHERE id=" . db_param();
db_query_bound( $query, Array( $t_view_state, $c_bugnote_id ) );

history_log_event_special( $t_bug_id, BUGNOTE_STATE_CHANGED, bugnote_format_id( $t_view_state ), $p_bugnote_id );
history_log_event_special( $t_bug_id, BUGNOTE_STATE_CHANGED, $t_view_state, bugnote_format_id( $p_bugnote_id ) );

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion core/history_api.php
Expand Up @@ -451,7 +451,7 @@ function history_localize_item( $p_field_name, $p_type, $p_old_value, $p_new_val
break;
case BUGNOTE_STATE_CHANGED:
$p_old_value = get_enum_element( 'view_state', $p_old_value );
$t_note = lang_get( 'bugnote_view_state' ) . ': ' . $p_old_value . ': ' . $p_new_value;
$t_note = lang_get( 'bugnote_view_state' ) . ': ' . $p_new_value . ': ' . $p_old_value;
break;
case BUG_MONITOR:
$p_old_value = user_get_name( $p_old_value );
Expand Down

0 comments on commit b9bd739

Please sign in to comment.