From 4b2d7735b30270ed933ed8ba3d6519183ec87dd6 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sun, 16 Mar 2014 00:11:12 +0100 Subject: [ticket/7707] Add get_username_string() where possible PHPBB3-7707 --- phpBB/includes/acp/acp_main.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'phpBB/includes/acp/acp_main.php') diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index fd45027b49..4512905539 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -40,11 +40,7 @@ class acp_main $user_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $perm_from = '' : '>'); - $perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '' : ''; - $perm_from .= $user_row['username']; - $perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '' : ''; - $perm_from .= ''; + $perm_from = get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']); $template->assign_vars(array( 'S_RESTORE_PERMISSIONS' => true, -- cgit v1.2.1 From db6e5a19f2f812012fa15047aa97e74608bff34c Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 26 Mar 2014 17:13:46 +0100 Subject: [ticket/7707] Remove unnecessary variables PHPBB3-7707 --- phpBB/includes/acp/acp_main.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'phpBB/includes/acp/acp_main.php') diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 4512905539..542a8c549b 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -40,12 +40,10 @@ class acp_main $user_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $perm_from = get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']); - $template->assign_vars(array( 'S_RESTORE_PERMISSIONS' => true, 'U_RESTORE_PERMISSIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm'), - 'PERM_FROM' => $perm_from, + 'PERM_FROM' => get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']), 'L_PERMISSIONS_TRANSFERRED_EXPLAIN' => sprintf($user->lang['PERMISSIONS_TRANSFERRED_EXPLAIN'], $perm_from, append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm')), )); -- cgit v1.2.1 From 8f525e1ef5777c1dc77d7eb4d43039c5dd059f88 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Fri, 4 Apr 2014 23:48:14 +0200 Subject: [ticket/7707] Fix undefined variable: perm_from PHPBB3-7707 --- phpBB/includes/acp/acp_main.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/acp/acp_main.php') diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 542a8c549b..4512905539 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -40,10 +40,12 @@ class acp_main $user_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); + $perm_from = get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']); + $template->assign_vars(array( 'S_RESTORE_PERMISSIONS' => true, 'U_RESTORE_PERMISSIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm'), - 'PERM_FROM' => get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']), + 'PERM_FROM' => $perm_from, 'L_PERMISSIONS_TRANSFERRED_EXPLAIN' => sprintf($user->lang['PERMISSIONS_TRANSFERRED_EXPLAIN'], $perm_from, append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm')), )); -- cgit v1.2.1