|
@ -92,9 +92,6 @@ if (isset($_POST['delete'])) { |
|
|
|
|
|
|
|
|
buildIndex(); |
|
|
buildIndex(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rebuildThemes('post-delete', $board['uri']); |
|
|
|
|
|
|
|
|
|
|
|
$is_mod = isset($_POST['mod']) && $_POST['mod']; |
|
|
$is_mod = isset($_POST['mod']) && $_POST['mod']; |
|
|
$root = $is_mod ? $config['root'] . $config['file_mod'] . '?/' : $config['root']; |
|
|
$root = $is_mod ? $config['root'] . $config['file_mod'] . '?/' : $config['root']; |
|
|
|
|
|
|
|
@ -104,6 +101,13 @@ if (isset($_POST['delete'])) { |
|
|
header('Content-Type: text/json'); |
|
|
header('Content-Type: text/json'); |
|
|
echo json_encode(array('success' => true)); |
|
|
echo json_encode(array('success' => true)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 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')) |
|
|
|
|
|
@fastcgi_finish_request(); |
|
|
|
|
|
|
|
|
|
|
|
rebuildThemes('post-delete', $board['uri']); |
|
|
|
|
|
|
|
|
} elseif (isset($_POST['report'])) { |
|
|
} elseif (isset($_POST['report'])) { |
|
|
if (!isset($_POST['board'], $_POST['reason'])) |
|
|
if (!isset($_POST['board'], $_POST['reason'])) |
|
|
error($config['error']['bot']); |
|
|
error($config['error']['bot']); |
|
@ -827,18 +831,6 @@ if (isset($_POST['delete'])) { |
|
|
bumpThread($post['thread']); |
|
|
bumpThread($post['thread']); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
buildThread($post['op'] ? $id : $post['thread']); |
|
|
|
|
|
|
|
|
|
|
|
if ($config['try_smarter'] && $post['op']) |
|
|
|
|
|
$build_pages = range(1, $config['max_pages']); |
|
|
|
|
|
|
|
|
|
|
|
if ($post['op']) |
|
|
|
|
|
clean(); |
|
|
|
|
|
|
|
|
|
|
|
event('post-after', $post); |
|
|
|
|
|
|
|
|
|
|
|
buildIndex(); |
|
|
|
|
|
|
|
|
|
|
|
if (isset($_SERVER['HTTP_REFERER'])) { |
|
|
if (isset($_SERVER['HTTP_REFERER'])) { |
|
|
// Tell Javascript that we posted successfully |
|
|
// Tell Javascript that we posted successfully |
|
|
if (isset($_COOKIE[$config['cookies']['js']])) |
|
|
if (isset($_COOKIE[$config['cookies']['js']])) |
|
@ -876,17 +868,14 @@ if (isset($_POST['delete'])) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
buildThread($post['op'] ? $id : $post['thread']); |
|
|
|
|
|
|
|
|
if ($config['syslog']) |
|
|
if ($config['syslog']) |
|
|
_syslog(LOG_INFO, 'New post: /' . $board['dir'] . $config['dir']['res'] . |
|
|
_syslog(LOG_INFO, 'New post: /' . $board['dir'] . $config['dir']['res'] . |
|
|
link_for($post) . (!$post['op'] ? '#' . $id : '')); |
|
|
link_for($post) . (!$post['op'] ? '#' . $id : '')); |
|
|
|
|
|
|
|
|
if (!$post['mod']) header('X-Associated-Content: "' . $redirect . '"'); |
|
|
if (!$post['mod']) header('X-Associated-Content: "' . $redirect . '"'); |
|
|
|
|
|
|
|
|
if ($post['op']) |
|
|
|
|
|
rebuildThemes('post-thread', $board['uri']); |
|
|
|
|
|
else |
|
|
|
|
|
rebuildThemes('post', $board['uri']); |
|
|
|
|
|
|
|
|
|
|
|
if (!isset($_POST['json_response'])) { |
|
|
if (!isset($_POST['json_response'])) { |
|
|
header('Location: ' . $redirect, true, $config['redirect_http']); |
|
|
header('Location: ' . $redirect, true, $config['redirect_http']); |
|
|
} else { |
|
|
} else { |
|
@ -897,6 +886,26 @@ if (isset($_POST['delete'])) { |
|
|
'id' => $id |
|
|
'id' => $id |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($config['try_smarter'] && $post['op']) |
|
|
|
|
|
$build_pages = range(1, $config['max_pages']); |
|
|
|
|
|
|
|
|
|
|
|
if ($post['op']) |
|
|
|
|
|
clean(); |
|
|
|
|
|
|
|
|
|
|
|
event('post-after', $post); |
|
|
|
|
|
|
|
|
|
|
|
buildIndex(); |
|
|
|
|
|
|
|
|
|
|
|
// 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')) |
|
|
|
|
|
@fastcgi_finish_request(); |
|
|
|
|
|
|
|
|
|
|
|
if ($post['op']) |
|
|
|
|
|
rebuildThemes('post-thread', $board['uri']); |
|
|
|
|
|
else |
|
|
|
|
|
rebuildThemes('post', $board['uri']); |
|
|
|
|
|
|
|
|
} elseif (isset($_POST['appeal'])) { |
|
|
} elseif (isset($_POST['appeal'])) { |
|
|
if (!isset($_POST['ban_id'])) |
|
|
if (!isset($_POST['ban_id'])) |
|
|
error($config['error']['bot']); |
|
|
error($config['error']['bot']); |
|
|