From 7b0e535f0371626826da14e189acc2e409e525c6 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Mon, 5 May 2014 10:54:39 -0700 Subject: [PATCH] [ticket/12501] Only select attachments uploaded before the post was reported. The post text displayed to the user is the same as when it was reported, even if the post was edited afterwards, thus it follows that the attachments would be the same. This also addresses an issue where the index in the attachment bbcode no longer matches that of its corresponding attachment when new attachments are uploaded after the post is reported. PHPBB3-12501 --- phpBB/includes/mcp/mcp_reports.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index f3b151edda..e73ef2b78f 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -159,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);