mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/12247] Makes static usernames work
Relative to the last ticket, this allows static usernames to work correctly (those inserted in the post-column post_username) when sending the e-mail, instead of showing just "Anonymous". PHPBB3-12247
This commit is contained in:
parent
b322cb4c11
commit
4333401a27
1 changed files with 4 additions and 2 deletions
|
@ -660,15 +660,17 @@ function approve_post($post_id_list, $id, $mode)
|
|||
|
||||
foreach ($post_info as $post_id => $post_data)
|
||||
{
|
||||
$username = ($post_data['post_username']) ? $post_data['post_username'] : $post_data['username'];
|
||||
|
||||
if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
|
||||
{
|
||||
// Forum Notifications
|
||||
user_notification('post', $post_data['topic_title'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id, $post_data['username']);
|
||||
user_notification('post', $post_data['topic_title'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id, $username);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Topic Notifications
|
||||
user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id, $post_data['username']);
|
||||
user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id, $username);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue