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
parent
commit
837e8d3c6e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      post.php

4
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);
}

Loading…
Cancel
Save