Merge branch 'master' of github.com:vichan-devel/Tinyboard
This commit is contained in:
commit
1c24c69999
8
post.php
8
post.php
@ -302,15 +302,15 @@ if (isset($_POST['delete'])) {
|
|||||||
markup($reason);
|
markup($reason);
|
||||||
|
|
||||||
foreach ($report as &$id) {
|
foreach ($report as &$id) {
|
||||||
$query = prepare(sprintf("SELECT `thread` FROM ``posts_%s`` WHERE `id` = :id", $board['uri']));
|
$query = prepare(sprintf("SELECT `id`, `thread` FROM ``posts_%s`` WHERE `id` = :id", $board['uri']));
|
||||||
$query->bindValue(':id', $id, PDO::PARAM_INT);
|
$query->bindValue(':id', $id, PDO::PARAM_INT);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
$thread = $query->fetchColumn();
|
$post = $query->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
if ($config['syslog'])
|
if ($config['syslog'])
|
||||||
_syslog(LOG_INFO, 'Reported post: ' .
|
_syslog(LOG_INFO, 'Reported post: ' .
|
||||||
'/' . $board['dir'] . $config['dir']['res'] . link_for($post) . ($thread ? '#' . $id : '') .
|
'/' . $board['dir'] . $config['dir']['res'] . link_for($post) . ($post['thread'] ? '#' . $id : '') .
|
||||||
' for "' . $reason . '"'
|
' for "' . $reason . '"'
|
||||||
);
|
);
|
||||||
$query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
|
$query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
|
||||||
@ -780,7 +780,7 @@ if (isset($_POST['delete'])) {
|
|||||||
error($config['error']['nomove']);
|
error($config['error']['nomove']);
|
||||||
|
|
||||||
if ($md5cmd) {
|
if ($md5cmd) {
|
||||||
$output = shell_exec_error($md5cmd . " < " . escapeshellarg($upload));
|
$output = shell_exec_error($md5cmd . " " . escapeshellarg($upload));
|
||||||
$output = explode(' ', $output);
|
$output = explode(' ', $output);
|
||||||
$hash = $output[0];
|
$hash = $output[0];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user