From f3e5acf3776083ec39052a3b8bf179638703d47e Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 26 Apr 2012 10:37:37 +0100 Subject: [ticket/10845] Changed the report system. Now it saves posts with the bbcode Now the bitfield and uid of the bbcode is saved in the reports table. This will allow parsing the BBCode while loading the post to show PHPBB3-10845 --- phpBB/report.php | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'phpBB/report.php') diff --git a/phpBB/report.php b/phpBB/report.php index 29b46a6211..4149a00329 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -71,9 +71,11 @@ if ($post_id) trigger_error('POST_NOT_EXIST'); } - $forum_id = (int) $report_data['forum_id']; - $topic_id = (int) $report_data['topic_id']; - $reported_post_text = $report_data['post_text']; + $forum_id = (int) $report_data['forum_id']; + $topic_id = (int) $report_data['topic_id']; + $reported_post_text = $report_data['post_text']; + $reported_post_bitfield = $report_data['bbcode_bitfield']; + $reported_post_uid = $report_data['bbcode_uid']; $sql = 'SELECT * FROM ' . FORUMS_TABLE . ' @@ -132,7 +134,9 @@ else trigger_error($message); } - $reported_post_text = $report_data['message_text']; + $reported_post_text = $report_data['message_text']; + $reported_post_bitfield = $report_data['bbcode_bitfield']; + $reported_post_uid = $report_data['bbcode_uid']; } // Submit report? @@ -150,16 +154,19 @@ if ($submit && $reason_id) trigger_error('EMPTY_REPORT'); } + $sql_ary = array( - 'reason_id' => (int) $reason_id, - 'post_id' => $post_id, - 'pm_id' => $pm_id, - 'user_id' => (int) $user->data['user_id'], - 'user_notify' => (int) $user_notify, - 'report_closed' => 0, - 'report_time' => (int) time(), - 'report_text' => (string) $report_text, + 'reason_id' => (int) $reason_id, + 'post_id' => $post_id, + 'pm_id' => $pm_id, + 'user_id' => (int) $user->data['user_id'], + 'user_notify' => (int) $user_notify, + 'report_closed' => 0, + 'report_time' => (int) time(), + 'report_text' => (string) $report_text, 'reported_post_text' => $reported_post_text, + 'reported_post_uid' => $reported_post_uid, + 'reported_post_bitfield'=> $reported_post_bitfield, ); $sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); -- cgit v1.2.1