aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart van Bragt <bartvb@users.sourceforge.net>2005-10-25 20:07:07 +0000
committerBart van Bragt <bartvb@users.sourceforge.net>2005-10-25 20:07:07 +0000
commit400f14ebb32da5424dca5ac678a3a4bec929965e (patch)
treedf605716ee410336043cc3216fd31302ed440692
parentaee876ebf476c7591516db792c19d389df1e602b (diff)
downloadforums-400f14ebb32da5424dca5ac678a3a4bec929965e.tar
forums-400f14ebb32da5424dca5ac678a3a4bec929965e.tar.gz
forums-400f14ebb32da5424dca5ac678a3a4bec929965e.tar.bz2
forums-400f14ebb32da5424dca5ac678a3a4bec929965e.tar.xz
forums-400f14ebb32da5424dca5ac678a3a4bec929965e.zip
Some more PM fixes
git-svn-id: file:///svn/phpbb/trunk@5279 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php3
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php6
2 files changed, 5 insertions, 4 deletions
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&amp;i=$id&amp;mode=view&amp;action=view_message" . (($msg_id) ? "&amp;p=$msg_id" : '');
+ $redirect = "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=pm&amp;mode=view&amp;action=view_message" . (($msg_id) ? "&amp;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", '<br />', censor_text($signature));
}
- $url = "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=$id";
+ $url = "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=pm";
$template->assign_vars(array(
'AUTHOR_NAME' => ($user_info['user_colour']) ? '<span style="color:#' . $user_info['user_colour'] . '">' . $user_info['username'] . '</span>' : $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&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_AUTHOR_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=" . $author_id,
'U_EMAIL' => $user_info['email'],
- 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&amp;mode=compose&amp;action=quote&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_QUOTE' => ($auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=quote&amp;f=$folder_id&amp;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&amp;mode=compose&amp;action=edit&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
- 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_PREVIOUS_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=previous",
'U_NEXT_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=next",