mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user