diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 4dd840ad53..4ae5989fed 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2229,6 +2229,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $phpbb_notifications->add_notifications(array('topic', 'quote'), array_merge($data, array( 'post_username' => $username, 'poster_id' => (int) $user->data['user_id'], + 'post_time' => $current_time, ))); break; @@ -2238,6 +2239,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'post_username' => $username, 'poster_id' => (int) $user->data['user_id'], 'post_text' => $data['message'], + 'post_time' => $current_time, ))); break; @@ -2265,6 +2267,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $phpbb_notifications->add_notifications(array('topic_in_queue'), array_merge($data, array( 'post_username' => $username, 'poster_id' => (int) $user->data['user_id'], + 'post_time' => $current_time, ))); break; @@ -2273,6 +2276,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $phpbb_notifications->add_notifications(array('post_in_queue'), array_merge($data, array( 'post_username' => $username, 'poster_id' => (int) $user->data['user_id'], + 'post_time' => $current_time, ))); break; diff --git a/phpBB/includes/notifications/type/post.php b/phpBB/includes/notifications/type/post.php index 8e801a2595..17a7a6863a 100644 --- a/phpBB/includes/notifications/type/post.php +++ b/phpBB/includes/notifications/type/post.php @@ -215,7 +215,7 @@ class phpbb_notifications_type_post extends phpbb_notifications_type_base $this->set_data('post_subject', $post['post_subject']); - $this->set_data('post_username', (($post['post_username'] != $this->phpbb_container->get('user')->data['username']) ? $post['post_username'] : '')); + $this->set_data('post_username', (($post['poster_id'] == ANONYMOUS) ? $post['post_username'] : '')); $this->set_data('forum_id', $post['forum_id']);