fix bug with removal of telegrams

This commit is contained in:
RealAngeleno 2023-07-18 02:35:56 -07:00 committed by -
parent 87bb597251
commit c351cb590e

View File

@ -1347,7 +1347,21 @@ if (isset($_POST['delete'])) {
if (!$post['mod']) header('X-Associated-Content: "' . $redirect . '"'); if (!$post['mod']) header('X-Associated-Content: "' . $redirect . '"');
if ($post['op']) { if (!isset($_POST['json_response'])) {
header('Location: ' . $redirect, true, $config['redirect_http']);
} else {
header('Content-Type: text/json; charset=utf-8');
echo json_encode(array(
'redirect' => $redirect,
'noko' => $noko,
'id' => $id
));
}
if ($config['try_smarter'] && $post['op'])
$build_pages = range(1, $config['max_pages']);
if ($post['op'])
clean($id); clean($id);
if ($config['try_smarter']) if ($config['try_smarter'])
@ -1356,18 +1370,13 @@ if (isset($_POST['delete'])) {
event('post-after', $post); event('post-after', $post);
// If this is a new thread or the poster is returning to the index, build it before they redirect buildIndex();
if ($post['op'] || !$noko)
buildIndex();
// We are already done, let's continue our heavy-lifting work in the background (if we run off FastCGI) // We are already done, let's continue our heavy-lifting work in the background (if we run off FastCGI)
if (function_exists('fastcgi_finish_request')) { if (function_exists('fastcgi_finish_request')) {
@fastcgi_finish_request(); @fastcgi_finish_request();
} }
if (!$post['op'] && $noko)
buildIndex();
if ($post['op']) { if ($post['op']) {
rebuildThemes('post-thread', $board['uri']); rebuildThemes('post-thread', $board['uri']);
} else { } else {