diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 8717ada511..bc49e0100b 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -60,7 +60,7 @@ function compose_pm($id, $mode, $action)
// Was cancel pressed? If so then redirect to the appropriate page
if ($cancel || ($current_time - $lastclick < 2 && $submit))
{
- $redirect = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id&mode=view&action=view_message" . (($msg_id) ? "&p=$msg_id" : '');
+ $redirect = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=view&action=view_message" . (($msg_id) ? "&p=$msg_id" : '');
redirect($redirect);
}
@@ -479,6 +479,7 @@ function compose_pm($id, $mode, $action)
'msg_id' => (int) $msg_id,
'from_user_id' => $user->data['user_id'],
'from_user_ip' => $user->data['user_ip'],
+ 'from_username' => $user->data['username'],
'reply_from_root_level' => (isset($root_level)) ? (int) $root_level : 0,
'reply_from_msg_id' => (int) $msg_id,
'icon_id' => (int) $icon_id,
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index b4ffa69d7a..3976e13764 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -158,7 +158,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$signature = str_replace("\n", '
', censor_text($signature));
}
- $url = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id";
+ $url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm";
$template->assign_vars(array(
'AUTHOR_NAME' => ($user_info['user_colour']) ? '' . $user_info['username'] . '' : $user_info['username'],
@@ -193,9 +193,9 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
'U_AUTHOR_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $author_id,
'U_EMAIL' => $user_info['email'],
- 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
+ 'U_QUOTE' => ($auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
'U_EDIT' => (($message_row['message_time'] > time() - $config['pm_edit_time'] || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
- 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
+ 'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous",
'U_NEXT_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=next",