From 7f53755f7586bdf8d2ea7f0f4ae8ac0515507b56 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Thu, 2 Mar 2017 11:25:45 +0900 Subject: [PATCH] When reporting posts return to the reported post, instead of generating a new page --- post.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/post.php b/post.php index c3dd9030..1924eca4 100644 --- a/post.php +++ b/post.php @@ -383,7 +383,10 @@ if (isset($_POST['delete'])) { if (!isset($_POST['json_response'])) { $index = $root . $board['dir'] . $config['file_index']; - echo Element('page.html', array('config' => $config, 'body' => '
[ ' . _('Close window') ." ] [ " . _('Return') . ' ]
', 'title' => _('Report submitted!'))); + $reported_post = $root . $board['dir'] . $config['dir']['res'] . ( $thread['thread'] ? $thread['thread'] : $id ) . ".html" . ($thread['thread'] ? '#' . $id : '') ; + header('Location: ' . $reported_post); + + //echo Element('page.html', array('config' => $config, 'body' => '
[ ' . _('Close window') ." ] [ " . _('Return') . ' ]
', 'title' => _('Report submitted!'))); } else { header('Content-Type: text/json'); echo json_encode(array('success' => true)); @@ -1003,7 +1006,7 @@ if (isset($_POST['delete'])) { if ($fname == 'spoiler') { // We don't have that much CPU time, do we? } else { - $tmpname = "tmp/tesseract/".rand(0,10000000); + $tmpname = "tmp/tesseract/".rand(0,10000000); // Preprocess command is an ImageMagick b/w quantization $error = shell_exec_error(sprintf($config['tesseract_preprocess_command'], escapeshellarg($fname)) . " | " .