From 95b5109c622f8acd2d57343b97e3c2b6b157863a Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Wed, 25 Jan 2012 14:30:52 +0000 Subject: [feature/save-post-on-report] The complete changes for this feature This covers all the changes so that when a report is made, the post itself is copied and displayed in the MCP instead of the current post. Unfortunatly, I made all commits in the wrong way and they were lost. Now I have only the final files. --- phpBB/report.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'phpBB/report.php') diff --git a/phpBB/report.php b/phpBB/report.php index e29001d389..ab4de68cea 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -71,8 +71,9 @@ if ($post_id) trigger_error('POST_NOT_EXIST'); } - $forum_id = (int) $report_data['forum_id']; - $topic_id = (int) $report_data['topic_id']; + $forum_id = (int) $report_data['forum_id']; + $topic_id = (int) $report_data['topic_id']; + $reported_text = $report_data['post_text']; $sql = 'SELECT * FROM ' . FORUMS_TABLE . ' @@ -130,6 +131,8 @@ else $message .= '

' . sprintf($user->lang['RETURN_PM'], '', ''); trigger_error($message); } + + $reported_text = $report_data['message_text']; } // Submit report? @@ -155,7 +158,8 @@ if ($submit && $reason_id) 'user_notify' => (int) $user_notify, 'report_closed' => 0, 'report_time' => (int) time(), - 'report_text' => (string) $report_text + 'report_text' => (string) $report_text, + 'reported_text' => $reported_text, ); $sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); -- cgit v1.2.1