diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index a4c2356a43..ec8a701791 100644
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -74,7 +74,7 @@ class mcp_notes
*/
function mcp_notes_user_view($action)
{
- global $config, $phpbb_log, $request;
+ global $config, $phpbb_log, $request, $phpbb_root_path, $phpEx;
global $template, $db, $user, $auth, $phpbb_container;
$user_id = $request->variable('u', 0);
@@ -185,9 +185,13 @@ class mcp_notes
trigger_error($msg . '
' . sprintf($user->lang['RETURN_PAGE'], '', ''));
}
- // Generate the appropriate user information for the user we are looking at
+ if (!function_exists('phpbb_get_user_rank'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
- $rank_title = $rank_img = '';
+ // Generate the appropriate user information for the user we are looking at
+ $rank_data = phpbb_get_user_rank($userrow, $userrow['user_posts']);
$avatar_img = phpbb_get_user_avatar($userrow);
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
@@ -239,7 +243,6 @@ class mcp_notes
'TOTAL_REPORTS' => $user->lang('LIST_REPORTS', (int) $log_count),
- 'RANK_TITLE' => $rank_title,
'JOINED' => $user->format_date($userrow['user_regdate']),
'POSTS' => ($userrow['user_posts']) ? $userrow['user_posts'] : 0,
'WARNINGS' => ($userrow['user_warnings']) ? $userrow['user_warnings'] : 0,
@@ -250,9 +253,9 @@ class mcp_notes
'U_PROFILE' => get_username_string('profile', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
'AVATAR_IMG' => $avatar_img,
- 'RANK_IMG' => $rank_img,
- )
- );
+ 'RANK_IMG' => $rank_data['img'],
+ 'RANK_TITLE' => $rank_data['title'],
+ ));
}
}