aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-11-13 20:34:39 +0100
committerAndreas Fischer <bantu@phpbb.com>2011-11-13 20:34:39 +0100
commit0a5d2a84d158e23b1d2e724d569c183bb049892e (patch)
tree46ae1beb9d5b22e0dc0583e35458bdd463dc27ba /phpBB/includes
parent0579795a173db538ce4aeb9b3ce09e55581e9f87 (diff)
parent2b3effb13c0f1d8322653147e5dcbc20ae36b418 (diff)
downloadforums-0a5d2a84d158e23b1d2e724d569c183bb049892e.tar
forums-0a5d2a84d158e23b1d2e724d569c183bb049892e.tar.gz
forums-0a5d2a84d158e23b1d2e724d569c183bb049892e.tar.bz2
forums-0a5d2a84d158e23b1d2e724d569c183bb049892e.tar.xz
forums-0a5d2a84d158e23b1d2e724d569c183bb049892e.zip
Merge remote-tracking branch 'igorw/ticket/8616' into develop-olympus
* igorw/ticket/8616: [ticket/8616] Include old U_INBOX var for BC [ticket/8616] Rename U_INBOX to U_VIEW_MESSAGE [ticket/8616] Direct links in pm notification emails
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_privmsgs.php9
-rw-r--r--phpBB/includes/ucp/ucp_pm.php2
2 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 4c34bc92ca..c40ceb088f 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1607,7 +1607,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
// Send Notifications
if ($mode != 'edit')
{
- pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message']);
+ pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message'], $data['msg_id']);
}
return $data['msg_id'];
@@ -1616,7 +1616,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
/**
* PM Notification
*/
-function pm_notification($mode, $author, $recipients, $subject, $message)
+function pm_notification($mode, $author, $recipients, $subject, $message, $msg_id)
{
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
@@ -1688,8 +1688,9 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
'AUTHOR_NAME' => htmlspecialchars_decode($author),
'USERNAME' => htmlspecialchars_decode($addr['name']),
- 'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox")
- );
+ 'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox",
+ 'U_VIEW_MESSAGE' => generate_board_url() . "/ucp.$phpEx?i=pm&mode=view&p=$msg_id",
+ ));
$messenger->send($addr['method']);
}
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index c675928a5b..447b6ebe87 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -243,7 +243,7 @@ class ucp_pm
$num_not_moved = $num_removed = 0;
$release = request_var('release', 0);
- if ($user->data['user_new_privmsg'] && $action == 'view_folder')
+ if ($user->data['user_new_privmsg'] && ($action == 'view_folder' || $action == 'view_message'))
{
$return = place_pm_into_folder($global_privmsgs_rules, $release);
$num_not_moved = $return['not_moved'];