aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/report.php
diff options
context:
space:
mode:
authorBruno Ais <brunoaiss@gmail.com>2012-04-26 10:37:37 +0100
committerBruno Ais <brunoaiss@gmail.com>2012-05-01 12:44:16 +0100
commitf3e5acf3776083ec39052a3b8bf179638703d47e (patch)
tree5b603cb843576551cc73a8bd6e63e9843d73b2ef /phpBB/report.php
parent417caa649a5fb87afa32a8a8f3600b591dddcce0 (diff)
downloadforums-f3e5acf3776083ec39052a3b8bf179638703d47e.tar
forums-f3e5acf3776083ec39052a3b8bf179638703d47e.tar.gz
forums-f3e5acf3776083ec39052a3b8bf179638703d47e.tar.bz2
forums-f3e5acf3776083ec39052a3b8bf179638703d47e.tar.xz
forums-f3e5acf3776083ec39052a3b8bf179638703d47e.zip
[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
Diffstat (limited to 'phpBB/report.php')
-rw-r--r--phpBB/report.php31
1 files changed, 19 insertions, 12 deletions
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);