aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-10-16 21:21:03 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-10-16 21:21:03 -0400
commitd5325e6934e7d469374c9e2cfe6c8c29ca5ffe4f (patch)
tree3080b3c8cf392c53a6c3de94a7f695b27550fba5 /phpBB/includes/functions_posting.php
parentad2feb917f5b26e36f28e3599c8f07bed268eb9e (diff)
parentf0544c884f6862e41bf35e6bd89db5849aa74e9f (diff)
downloadforums-d5325e6934e7d469374c9e2cfe6c8c29ca5ffe4f.tar
forums-d5325e6934e7d469374c9e2cfe6c8c29ca5ffe4f.tar.gz
forums-d5325e6934e7d469374c9e2cfe6c8c29ca5ffe4f.tar.bz2
forums-d5325e6934e7d469374c9e2cfe6c8c29ca5ffe4f.tar.xz
forums-d5325e6934e7d469374c9e2cfe6c8c29ca5ffe4f.zip
Merge PR #624 branch 'develop-olympus' into develop
* develop-olympus: [ticket/8743] Include poster“s name in mail notifications
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 20550cf7a0..171cf988ce 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1178,7 +1178,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
/**
* User Notification
*/
-function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id)
+function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id, $author_name = '')
{
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
@@ -1349,6 +1349,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
'USERNAME' => htmlspecialchars_decode($addr['name']),
'TOPIC_TITLE' => htmlspecialchars_decode($topic_title),
'FORUM_NAME' => htmlspecialchars_decode($forum_name),
+ 'AUTHOR_NAME' => htmlspecialchars_decode($author_name),
'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id",
'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id",
@@ -2454,7 +2455,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// Send Notifications
if (($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_approval)
{
- user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id']);
+ $username = ($username) ? $username : $user->data['username'];
+ user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id'], $username);
}
$params = $add_anchor = '';