Browse Source
Merge pull request #116 from nonmakina/fixReporting
Fixes reporting function
pull/40/head
towards-a-new-leftypol
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
post.php
|
|
@ -324,14 +324,14 @@ function handle_report(){ |
|
|
|
$reason = escape_markup_modifiers($_POST['reason']); |
|
|
|
markup($reason); |
|
|
|
|
|
|
|
foreach ($report as &$id) { |
|
|
|
foreach ($report as $id) { |
|
|
|
$query = prepare(sprintf("SELECT `id`,`thread` , `body_nomarkup` FROM ``posts_%s`` WHERE `id` = :id", $board['uri'])); |
|
|
|
$query->bindValue(':id', $id, PDO::PARAM_INT); |
|
|
|
$query->execute() or error(db_error($query)); |
|
|
|
|
|
|
|
$thread = $query->fetch(PDO::FETCH_ASSOC); |
|
|
|
|
|
|
|
$error = event('report', array('ip' => $_SERVER['REMOTE_ADDR'], 'board' => $board['uri'], 'post' => $post, 'reason' => $reason, 'link' => link_for($post))); |
|
|
|
$error = event('report', array('ip' => $_SERVER['REMOTE_ADDR'], 'board' => $board['uri'], 'post' => $post, 'reason' => $reason, 'link' => link_for($thread))); |
|
|
|
if ($error) { |
|
|
|
error($error); |
|
|
|
} |
|
|
|