1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

Merge branch '3.2.x' into 3.3.x

This commit is contained in:
Marc Alexander 2020-03-29 20:48:38 +02:00
commit 6e89799b05
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -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 . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
}
// 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'],
));
}
}