aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAlan <asinshesq@code.phpbb.com>2011-10-13 19:17:56 +0200
committerIgor Wiedler <igor@wiedler.ch>2011-10-13 19:17:56 +0200
commitf7c1341402ea47cc33ac183421485db3efd7ea15 (patch)
tree1f11a3b44aaa390d2faa221cd21beefeda00db0c /phpBB
parentb957639abb4eba00b840092e60fffbc36a9db84c (diff)
downloadforums-f7c1341402ea47cc33ac183421485db3efd7ea15.tar
forums-f7c1341402ea47cc33ac183421485db3efd7ea15.tar.gz
forums-f7c1341402ea47cc33ac183421485db3efd7ea15.tar.bz2
forums-f7c1341402ea47cc33ac183421485db3efd7ea15.tar.xz
forums-f7c1341402ea47cc33ac183421485db3efd7ea15.zip
[ticket/8616] Direct links in pm notification emails
Import the "Direct links in pm notification emails" modification, version 1.0.1. PHPBB3-8616
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_privmsgs.php6
-rw-r--r--phpBB/includes/ucp/ucp_pm.php2
-rw-r--r--phpBB/ucp.php6
3 files changed, 10 insertions, 4 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 4c34bc92ca..a857109466 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,7 +1688,7 @@ 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&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'];
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index 8fa022668b..45caeb12ea 100644
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -254,6 +254,12 @@ if (!$user->data['is_registered'])
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
}
+ if ($id == 'pm' && $mode == 'view' && isset($_GET['p']))
+ {
+ $redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx?i=pm&p=" . request_var('p', 0));
+ login_box($redirect_url, $user->lang['LOGIN_EXPLAIN_UCP']);
+ }
+
login_box('', $user->lang['LOGIN_EXPLAIN_UCP']);
}