diff --git a/inc/config.php b/inc/config.php index 77c3ed57..f058c491 100644 --- a/inc/config.php +++ b/inc/config.php @@ -318,6 +318,7 @@ 'hash', 'board', 'thread', + 'active-page', 'mod', 'name', 'email', diff --git a/post.php b/post.php index 1f3a2b97..a00b0e2b 100644 --- a/post.php +++ b/post.php @@ -713,7 +713,15 @@ if (isset($_POST['delete'])) { } if (!$post['mod']) { - $post['antispam_hash'] = checkSpam(array($board['uri'], isset($post['thread']) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null))); + + if (isset($_POST['active-page']) && $_POST['active-page'] === 'index') { + $page = isset($_POST['page']) ? (int)$_POST['page'] : 0; + $extra_salt = $config['try_smarter'] ? -$page : 0; + } else { + $extra_salt = $post['thread']; + } + + $post['antispam_hash'] = checkSpam(array($board['uri'], $extra_salt)); if ($post['antispam_hash'] === true) error($config['error']['spam']); } diff --git a/templates/post_form.html b/templates/post_form.html index 038395fa..f1192c08 100644 --- a/templates/post_form.html +++ b/templates/post_form.html @@ -1,6 +1,11 @@