mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-02 12:34:59 +02:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [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
This commit is contained in:
commit
1b003fd244
@ -1652,7 +1652,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'];
|
||||
@ -1661,7 +1661,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;
|
||||
|
||||
@ -1733,8 +1733,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']);
|
||||
}
|
||||
|
@ -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'];
|
||||
|
@ -8,7 +8,7 @@ You have received a new private message from "{AUTHOR_NAME}" to your account on
|
||||
|
||||
You can view your new message by clicking on the following link:
|
||||
|
||||
{U_INBOX}
|
||||
{U_VIEW_MESSAGE}
|
||||
|
||||
You have requested that you be notified on this event, remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.
|
||||
|
||||
|
@ -256,6 +256,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']);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user