diff options
| author | czaks <marcin@6irc.net> | 2016-08-14 16:24:25 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-08-14 16:24:25 +0200 |
| commit | 1c24c69999db67ebbc13fef7c53e37d08768008f (patch) | |
| tree | 9bb5bac34fdae13e8ad1534bde768f19c6ca57bb /post.php | |
| parent | 5e335a8564a76f0449d47f0767b4baa8d2cb9e91 (diff) | |
| parent | a2092166567ef78c6fa4410650e858fcaead0caa (diff) | |
Merge branch 'master' of github.com:vichan-devel/Tinyboard
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -302,15 +302,15 @@ if (isset($_POST['delete'])) { markup($reason); 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->execute() or error(db_error($query)); - $thread = $query->fetchColumn(); + $post = $query->fetch(PDO::FETCH_ASSOC); if ($config['syslog']) _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 . '"' ); $query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)"); @@ -780,7 +780,7 @@ if (isset($_POST['delete'])) { error($config['error']['nomove']); if ($md5cmd) { - $output = shell_exec_error($md5cmd . " < " . escapeshellarg($upload)); + $output = shell_exec_error($md5cmd . " " . escapeshellarg($upload)); $output = explode(' ', $output); $hash = $output[0]; } |
