diff options
author | Cesar G <prototech91@gmail.com> | 2014-05-05 10:45:46 -0700 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-05-05 11:05:15 -0700 |
commit | 9705e1883dd19bbe27176accf8cf481b2e59815a (patch) | |
tree | 9fd3c964e8d724b48dd89c8f15a733722c07fce3 /phpBB/includes | |
parent | 324daf72fec829a4a937879ef0615829443114cc (diff) | |
download | forums-9705e1883dd19bbe27176accf8cf481b2e59815a.tar forums-9705e1883dd19bbe27176accf8cf481b2e59815a.tar.gz forums-9705e1883dd19bbe27176accf8cf481b2e59815a.tar.bz2 forums-9705e1883dd19bbe27176accf8cf481b2e59815a.tar.xz forums-9705e1883dd19bbe27176accf8cf481b2e59815a.zip |
[ticket/12501] Parse the reported post message before its attachments.
This ensures that the empty lines from attachment.html aren't converted into
<br />.
PHPBB3-12501
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/mcp/mcp_reports.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 5681b83212..f3b151edda 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -143,6 +143,13 @@ class mcp_reports } $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false; + $message = generate_text_for_display( + $report['reported_post_text'], + $report['reported_post_uid'], + $report['reported_post_bitfield'], + $parse_post_flags, + false + ); $report['report_text'] = make_clickable(bbcode_nl2br($report['report_text'])); @@ -164,7 +171,7 @@ class mcp_reports if (sizeof($attachments)) { $update_count = array(); - parse_attachments($post_info['forum_id'], $report['reported_post_text'], $attachments, $update_count); + parse_attachments($post_info['forum_id'], $message, $attachments, $update_count); } // Display not already displayed Attachments for this post, we already parsed them. ;) @@ -224,7 +231,7 @@ class mcp_reports 'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']), 'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']), - 'POST_PREVIEW' => generate_text_for_display($report['reported_post_text'], $report['reported_post_uid'], $report['reported_post_bitfield'], $parse_post_flags, false), + 'POST_PREVIEW' => $message, 'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'], 'POST_DATE' => $user->format_date($post_info['post_time']), 'POST_IP' => $post_info['poster_ip'], |