Skip to content

Commit e8bbbbd

Browse files
committed
[ticket/15931] Fix PM report emails
PHPBB3-15931
1 parent 5e302c7 commit e8bbbbd

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

phpBB/language/en/email/report_pm.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Subject: Private Message report - "{TOPIC_TITLE}"
1+
Subject: Private Message report - "{SUBJECT}"
22

33
Hello {USERNAME},
44

phpBB/phpbb/notification/type/report_pm.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,16 @@ public function get_email_template()
142142
*/
143143
public function get_email_template_variables()
144144
{
145-
$user_data = $this->user_loader->get_user($this->get_data('reporter_id'));
145+
$user_data = $this->user_loader->get_user($this->get_data('from_user_id'));
146146

147147
return array(
148148
'AUTHOR_NAME' => htmlspecialchars_decode($user_data['username']),
149149
'SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('message_subject'))),
150150

151-
'U_VIEW_REPORT' => generate_board_url() . "mcp.{$this->php_ext}?r={$this->item_parent_id}&i=pm_reports&mode=pm_report_details",
151+
/** @deprecated 3.2.6-RC1 (to be removed in 4.0.0) use {SUBJECT} instead in report_pm.txt */
152+
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('message_subject'))),
153+
154+
'U_VIEW_REPORT' => generate_board_url() . "/mcp.{$this->php_ext}?r={$this->item_parent_id}&i=pm_reports&mode=pm_report_details",
152155
);
153156
}
154157

@@ -236,8 +239,10 @@ public function get_avatar()
236239
*/
237240
public function users_to_query()
238241
{
239-
return array($this->get_data('reporter_id'));
240-
}
242+
return array(
243+
$this->get_data('from_user_id'),
244+
$this->get_data('reporter_id'),
245+
); }
241246

242247
/**
243248
* {@inheritdoc}

0 commit comments

Comments
 (0)