aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-05-11 11:00:27 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-05-11 11:00:27 +0200
commitf2fc18b4b7cd2aa619ed448d338741501812031a (patch)
tree254db6267dded5dc096679a5360dec5c8f957fe1 /phpBB/includes
parent6cd7abe2557336a88db0220603c83743f1291642 (diff)
parent7b0e535f0371626826da14e189acc2e409e525c6 (diff)
downloadforums-f2fc18b4b7cd2aa619ed448d338741501812031a.tar
forums-f2fc18b4b7cd2aa619ed448d338741501812031a.tar.gz
forums-f2fc18b4b7cd2aa619ed448d338741501812031a.tar.bz2
forums-f2fc18b4b7cd2aa619ed448d338741501812031a.tar.xz
forums-f2fc18b4b7cd2aa619ed448d338741501812031a.zip
Merge pull request #2412 from prototech/ticket/12501
[ticket/12501] Fix improper display of inline attachments in post report page * prototech/ticket/12501: [ticket/12501] Only select attachments uploaded before the post was reported. [ticket/12501] Parse the reported post message before its attachments.
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/mcp/mcp_reports.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 5681b83212..e73ef2b78f 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']));
@@ -152,6 +159,7 @@ class mcp_reports
FROM ' . ATTACHMENTS_TABLE . '
WHERE post_msg_id = ' . $post_id . '
AND in_message = 0
+ AND filetime <= ' . (int) $report['report_time'] . '
ORDER BY filetime DESC';
$result = $db->sql_query($sql);
@@ -164,7 +172,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 +232,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'],