aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/notification/type/post.php48
1 files changed, 41 insertions, 7 deletions
diff --git a/phpBB/includes/notification/type/post.php b/phpBB/includes/notification/type/post.php
index a2b1fbf82a..d6f6c16e59 100644
--- a/phpBB/includes/notification/type/post.php
+++ b/phpBB/includes/notification/type/post.php
@@ -171,20 +171,36 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
*/
public function get_title()
{
- if ($this->get_data('post_username'))
+ $responders = $this->get_data('responders');
+ $usernames = array();
+
+ if (!is_array($responders))
{
- $username = $this->get_data('post_username');
+ $responders = array();
}
- else
+
+ $responders = array_merge(array(array(
+ 'poster_id' => $this->get_data('poster_id'),
+ 'username' => $this->get_data('post_username'),
+ )), $responders);
+
+ foreach ($responders as $responder)
{
- $user_data = $this->notification_manager->get_user($this->get_data('poster_id'));
+ if ($responder['username'])
+ {
+ $usernames[] = $responder['username'];
+ }
+ else
+ {
+ $user_data = $this->notification_manager->get_user($responder['poster_id']);
- $username = get_username_string('no_profile', $user_data['user_id'], $user_data['username'], $user_data['user_colour']);
+ $usernames[] = get_username_string('no_profile', $user_data['user_id'], $user_data['username'], $user_data['user_colour']);
+ }
}
return $this->user->lang(
$this->language_key,
- $username,
+ implode(', ', $usernames),
censor_text($this->get_data('topic_title'))
);
}
@@ -226,7 +242,25 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
*/
public function users_to_query()
{
- return array($this->data['poster_id']);
+ /*$responders[] = array(
+ 'poster_id' => $post['poster_id'],
+ 'username' => (($post['poster_id'] == ANONYMOUS) ? $post['post_username'] : ''),
+ );*/
+
+ $responders = $this->get_data('responders');
+ $users = array(
+ $this->get_data('poster_id'),
+ );
+
+ if (is_array($responders))
+ {
+ foreach ($responders as $responder)
+ {
+ $users[] = $responder['poster_id'];
+ }
+ }
+
+ return $users;
}
/**