1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/7707] Add get_username_string() where possible

PHPBB3-7707
This commit is contained in:
Oliver Schramm
2014-03-16 00:11:12 +01:00
parent 325931a56b
commit 4b2d7735b3
7 changed files with 19 additions and 23 deletions

View File

@@ -294,8 +294,8 @@ function mcp_post_details($id, $mode, $action)
'REPORT_ID' => $row['report_id'],
'REASON_TITLE' => $row['reason_title'],
'REASON_DESC' => $row['reason_description'],
'REPORTER' => ($row['user_id'] != ANONYMOUS) ? $row['username'] : $user->lang['GUEST'],
'U_REPORTER' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) : '',
'REPORTER' => get_username_string('username', $row['user_id'], $row['username']),
'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username']),
'USER_NOTIFY' => ($row['user_notify']) ? true : false,
'REPORT_TIME' => $user->format_date($row['report_time']),
'REPORT_TEXT' => bbcode_nl2br(trim($row['report_text'])),
@@ -354,11 +354,11 @@ function mcp_post_details($id, $mode, $action)
foreach ($users_ary as $user_id => $user_row)
{
$template->assign_block_vars('userrow', array(
'USERNAME' => ($user_id == ANONYMOUS) ? $user->lang['GUEST'] : $user_row['username'],
'USERNAME' => get_username_string('username', $user_id, $user_row['username']),
'NUM_POSTS' => $user_row['postings'],
'L_POST_S' => ($user_row['postings'] == 1) ? $user->lang['POST'] : $user->lang['POSTS'],
'U_PROFILE' => ($user_id == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id),
'U_PROFILE' => get_username_string('profile', $user_id, $user_row['username']),
'U_SEARCHPOSTS' => append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user_id . '&sr=topics'))
);
}

View File

@@ -96,9 +96,9 @@ class mcp_warn
'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']),
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
'U_USER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
'WARNING_TIME' => $user->format_date($row['user_last_warning']),
'WARNINGS' => $row['user_warnings'],
@@ -118,9 +118,9 @@ class mcp_warn
'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']),
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
'U_USER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
'WARNING_TIME' => $user->format_date($row['warning_time']),
'WARNINGS' => $row['user_warnings'],
@@ -167,9 +167,9 @@ class mcp_warn
'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']),
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
'U_USER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
'WARNING_TIME' => $user->format_date($row['user_last_warning']),
'WARNINGS' => $row['user_warnings'],