From a00a594a82d7cd4bf9df351727c2954cc5089a5b Mon Sep 17 00:00:00 2001 From: Robert Munteanu Date: Mon, 9 Nov 2009 23:58:11 +0200 Subject: [PATCH] Issue #11088: Update emails show @0@ instead of the access level of each bugnote author Update email_format_bug_message to pass in the project id to access_get_project_level for the bugnote reporter instead of relying on helper_get_current_project() to guess the correct one. --- core/email_api.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/core/email_api.php b/core/email_api.php index e824206..c8944b8 100644 --- a/core/email_api.php +++ b/core/email_api.php @@ -1305,7 +1305,7 @@ function email_format_bug_message( $p_visible_bug_data ) { } if( user_exists( $t_bugnote->reporter_id ) ) { - $t_access_level = access_get_project_level( null, $t_bugnote->reporter_id ); + $t_access_level = access_get_project_level( $p_visible_bug_data['email_project_id'] , $t_bugnote->reporter_id ); $t_access_level_string = ' (' . get_enum_element( 'access_levels', $t_access_level ) . ') - '; } else { $t_access_level_string = ''; @@ -1385,6 +1385,7 @@ function email_build_visible_bug_data( $p_user_id, $p_bug_id, $p_message_id ) { } $t_bug_data['email_reporter'] = user_get_name( $row['reporter_id'] ); + $t_bug_data['email_project_id'] = $row['project_id']; $t_bug_data['email_project'] = project_get_field( $row['project_id'], 'name' ); $t_category_name = category_full_name( $row['category_id'], false ); -- 1.6.4.2