mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[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.
This commit is contained in:
@@ -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 .= '<br /><br />' . sprintf($user->lang['RETURN_PM'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
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);
|
||||
|
Reference in New Issue
Block a user