Skip to content
Permalink
Browse files

Send usernames in history of e-mail notifications based on show_realn…

…ames

This reverts the changes from #24167 that have been needed as we
were no longer able to protect realnames by show_user_realname_threshold.

The change assumes that we agree, that show_realnames = ON allows
any user to see the realnames.

show_user_realname_threshold is just used on view user page
if show_realnames = OFF (behavior before version 2.12.0)

Issue #24432
  • Loading branch information...
atrol committed May 20, 2018
1 parent 85a2e55 commit 1b6ba0ff08ac527f7aafb1f9520f92e462fa3f3b
Showing with 9 additions and 9 deletions.
  1. +9 −9 core/history_api.php
@@ -435,7 +435,7 @@ function history_get_event_from_row( $p_result, $p_user_id = null, $p_check_acce
$t_event['bug_id'] = $v_bug_id;
$t_event['date'] = $v_date_modified;
$t_event['userid'] = $v_user_id;
$t_event['username'] = user_get_username( $v_user_id );
$t_event['username'] = user_get_name( $v_user_id );
$t_event['field'] = $v_field_name;
$t_event['type'] = $v_type;
$t_event['old_value'] = $v_old_value;
@@ -763,13 +763,13 @@ function history_localize_item( $p_field_name, $p_type, $p_old_value, $p_new_val
if( 0 == $p_old_value ) {
$p_old_value = '';
} else {
$p_old_value = user_get_username( $p_old_value );
$p_old_value = user_get_name( $p_old_value );
}
if( 0 == $p_new_value ) {
$p_new_value = '';
} else {
$p_new_value = user_get_username( $p_new_value );
$p_new_value = user_get_name( $p_new_value );
}
break;
case 'date_submitted':
@@ -865,12 +865,12 @@ function history_localize_item( $p_field_name, $p_type, $p_old_value, $p_new_val
$t_note = lang_get( 'bugnote_view_state' ) . ': ' . $p_new_value . ': ' . $p_old_value;
break;
case BUG_MONITOR:
$p_old_value = user_get_username( $p_old_value );
$p_old_value = user_get_name( $p_old_value );
$t_note = lang_get( 'bug_monitor' ) . ': ' . $p_old_value;
break;
case BUG_UNMONITOR:
if( $p_old_value !== '' ) {
$p_old_value = user_get_username( $p_old_value );
$p_old_value = user_get_name( $p_old_value );
}
$t_note = lang_get( 'bug_end_monitor' ) . ': ' . $p_old_value;
break;
@@ -879,19 +879,19 @@ function history_localize_item( $p_field_name, $p_type, $p_old_value, $p_new_val
break;
case BUG_ADD_SPONSORSHIP:
$t_note = lang_get( 'sponsorship_added' );
$t_change = user_get_username( $p_old_value ) . ': ' . sponsorship_format_amount( $p_new_value );
$t_change = user_get_name( $p_old_value ) . ': ' . sponsorship_format_amount( $p_new_value );
break;
case BUG_UPDATE_SPONSORSHIP:
$t_note = lang_get( 'sponsorship_updated' );
$t_change = user_get_username( $p_old_value ) . ': ' . sponsorship_format_amount( $p_new_value );
$t_change = user_get_name( $p_old_value ) . ': ' . sponsorship_format_amount( $p_new_value );
break;
case BUG_DELETE_SPONSORSHIP:
$t_note = lang_get( 'sponsorship_deleted' );
$t_change = user_get_username( $p_old_value ) . ': ' . sponsorship_format_amount( $p_new_value );
$t_change = user_get_name( $p_old_value ) . ': ' . sponsorship_format_amount( $p_new_value );
break;
case BUG_PAID_SPONSORSHIP:
$t_note = lang_get( 'sponsorship_paid' );
$t_change = user_get_username( $p_old_value ) . ': ' . get_enum_element( 'sponsorship', $p_new_value );
$t_change = user_get_name( $p_old_value ) . ': ' . get_enum_element( 'sponsorship', $p_new_value );
break;
case BUG_ADD_RELATIONSHIP:
$t_note = lang_get( 'relationship_added' );

0 comments on commit 1b6ba0f

Please sign in to comment.
You can’t perform that action at this time.