mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-18 02:16:03 +01:00
Fix post.php
I believe that you ended up closing some functions by mistake and then gave the following error when making a post: PHP message: PHP Parse error: syntax error, unexpected '}', expecting end of file in /var/www/vichan/html/post.php on line 462
This commit is contained in:
parent
5a027781cc
commit
61d6132bb3
32
post.php
32
post.php
@ -402,19 +402,17 @@ if (isset($_POST['delete'])) {
|
|||||||
if (!$resp['success']) {
|
if (!$resp['success']) {
|
||||||
error($config['error']['captcha']);
|
error($config['error']['captcha']);
|
||||||
}
|
}
|
||||||
// Same, but now with our custom captcha provider
|
// Same, but now with our custom captcha provider
|
||||||
if (($config['captcha']['enabled']) || (($post['op']) && ($config['new_thread_capt'])) ) {
|
if (($config['captcha']['enabled']) || (($post['op']) && ($config['new_thread_capt'])) ) {
|
||||||
$resp = file_get_contents($config['captcha']['provider_check'] . "?" . http_build_query([
|
$resp = file_get_contents($config['captcha']['provider_check'] . "?" . http_build_query([
|
||||||
'mode' => 'check',
|
'mode' => 'check',
|
||||||
'text' => $_POST['captcha_text'],
|
'text' => $_POST['captcha_text'],
|
||||||
'extra' => $config['captcha']['extra'],
|
'extra' => $config['captcha']['extra'],
|
||||||
'cookie' => $_POST['captcha_cookie']
|
'cookie' => $_POST['captcha_cookie']
|
||||||
]));
|
]));
|
||||||
if ($resp !== '1') {
|
if ($resp !== '1') {
|
||||||
error($config['error']['captcha'] .
|
error($config['error']['captcha'] .
|
||||||
'<script>if (actually_load_captcha !== undefined) actually_load_captcha("'.$config['captcha']['provider_get'].'", "'.$config['captcha']['extra'].'");</script>');
|
'<script>if (actually_load_captcha !== undefined) actually_load_captcha("'.$config['captcha']['provider_get'].'", "'.$config['captcha']['extra'].'");</script>');
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1222,9 +1220,9 @@ if (isset($_POST['delete'])) {
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
skip_redirect:
|
skip_redirect:
|
||||||
|
|
||||||
|
|
||||||
if ($config['try_smarter'] && $post['op'])
|
if ($config['try_smarter'] && $post['op'])
|
||||||
$build_pages = range(1, $config['max_pages']);
|
$build_pages = range(1, $config['max_pages']);
|
||||||
|
|
||||||
@ -1234,8 +1232,8 @@ if (isset($_POST['delete'])) {
|
|||||||
event('post-after', $post);
|
event('post-after', $post);
|
||||||
|
|
||||||
buildIndex();
|
buildIndex();
|
||||||
|
|
||||||
if (count($telegrams) > 0) {
|
if (count($telegrams) > 0) {
|
||||||
$ids = implode(', ', array_map(function($x) { return (int)$x['id']; }, $telegrams));
|
$ids = implode(', ', array_map(function($x) { return (int)$x['id']; }, $telegrams));
|
||||||
query("UPDATE ``telegrams`` SET ``seen`` = 1 WHERE ``id`` IN({$ids})") or error(db_error());
|
query("UPDATE ``telegrams`` SET ``seen`` = 1 WHERE ``id`` IN({$ids})") or error(db_error());
|
||||||
die(Element('page.html', array(
|
die(Element('page.html', array(
|
||||||
@ -1257,7 +1255,7 @@ if (isset($_POST['delete'])) {
|
|||||||
rebuildThemes('post-thread', $board['uri']);
|
rebuildThemes('post-thread', $board['uri']);
|
||||||
else
|
else
|
||||||
rebuildThemes('post', $board['uri']);
|
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']);
|
||||||
|
Loading…
Reference in New Issue
Block a user