1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-20 12:41:17 +01:00

[#184] FUCK PLEASE WORK

This commit is contained in:
unknown 2014-10-19 12:10:50 -05:00
commit 7cac272396
3 changed files with 6 additions and 2 deletions

View File

@ -2272,6 +2272,9 @@ function mod_reports() {
error($config['error']['noaccess']);
}
// Limit reports to ONLY those in our scope.
$report_scope = $global ? "global" : "local";
// Get REPORTS.
$query = prepare("SELECT * FROM ``reports`` " . ($mod["type"] == "20" ? "WHERE board = :board" : "") . " WHERE ``".($global ? "global" : "local")."``=TRUE LIMIT :limit");

View File

@ -145,12 +145,13 @@ if (isset($_POST['delete'])) {
'/' . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $thread ? $thread : $id) . ($thread ? '#' . $id : '') .
' for "' . $reason . '"'
);
$query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason, :global)");
$query = prepare("INSERT INTO ``reports`` (`time`, `ip`, `board`, `post`, `reason`, `local`, `global`) VALUES (:time, :ip, :board, :post, :reason, :local, :global)");
$query->bindValue(':time', time(), PDO::PARAM_INT);
$query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
$query->bindValue(':board', $board['uri'], PDO::PARAM_INT);
$query->bindValue(':post', $id, PDO::PARAM_INT);
$query->bindValue(':reason', $reason, PDO::PARAM_STR);
$query->bindValue(':local', 1, PDO::PARAM_BOOL);
$query->bindValue(':global', isset($_POST['global']), PDO::PARAM_BOOL);
$query->execute() or error(db_error($query));
}

View File

@ -125,4 +125,4 @@
.report-content-action:last-child::after {
display: none;
content: '';
}
}