When reporting posts return to the reported post, instead of generating a new page
This commit is contained in:
parent
9c189eff4f
commit
7f53755f75
7
post.php
7
post.php
|
@ -383,7 +383,10 @@ if (isset($_POST['delete'])) {
|
||||||
|
|
||||||
if (!isset($_POST['json_response'])) {
|
if (!isset($_POST['json_response'])) {
|
||||||
$index = $root . $board['dir'] . $config['file_index'];
|
$index = $root . $board['dir'] . $config['file_index'];
|
||||||
echo Element('page.html', array('config' => $config, 'body' => '<div style="text-align:center"><a href="javascript:window.close()">[ ' . _('Close window') ." ]</a> <a href='$index'>[ " . _('Return') . ' ]</a></div>', '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' => '<div style="text-align:center"><a href="javascript:window.close()">[ ' . _('Close window') ." ]</a> <a href='$index'>[ " . _('Return') . ' ]</a></div>', 'title' => _('Report submitted!')));
|
||||||
} else {
|
} else {
|
||||||
header('Content-Type: text/json');
|
header('Content-Type: text/json');
|
||||||
echo json_encode(array('success' => true));
|
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?
|
if ($fname == 'spoiler') { // We don't have that much CPU time, do we?
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$tmpname = "tmp/tesseract/".rand(0,10000000);
|
$tmpname = "tmp/tesseract/".rand(0,10000000);
|
||||||
|
|
||||||
// Preprocess command is an ImageMagick b/w quantization
|
// Preprocess command is an ImageMagick b/w quantization
|
||||||
$error = shell_exec_error(sprintf($config['tesseract_preprocess_command'], escapeshellarg($fname)) . " | " .
|
$error = shell_exec_error(sprintf($config['tesseract_preprocess_command'], escapeshellarg($fname)) . " | " .
|
||||||
|
|
Loading…
Reference in New Issue