mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
Prettier simple-antispam
This commit is contained in:
parent
3ac86a074a
commit
d5109426d9
@ -308,14 +308,12 @@
|
||||
);
|
||||
|
||||
// Enable simple anti-spam measure. Requires the end-user to answer a question before making a post.
|
||||
//Works very well against uncustomized spam.
|
||||
//Answers are case-insensitive.
|
||||
/*
|
||||
$config['simple_spam'] = array (
|
||||
'question' => 'What\'s 2+3?',
|
||||
'answer' => '5'
|
||||
);
|
||||
*/
|
||||
// Works very well against uncustomized spam. Answers are case-insensitive.
|
||||
// $config['simple_spam'] = array (
|
||||
// 'question' => 'What\'s 2+3?',
|
||||
// 'answer' => '5'
|
||||
//);
|
||||
$config['simple_spam'] = false;
|
||||
|
||||
// Enable reCaptcha to make spam even harder. Rarely necessary.
|
||||
$config['recaptcha'] = false;
|
||||
|
2
post.php
2
post.php
@ -558,7 +558,7 @@ if (isset($_POST['delete'])) {
|
||||
|
||||
|
||||
if (!$dropped_post) {
|
||||
if (isset($config['simple_spam']) && $config['simple_spam'] && $post['op']) {
|
||||
if ($config['simple_spam'] && $post['op']) {
|
||||
if (!isset($_POST['simple_spam']) || strtolower($config['simple_spam']['answer']) != strtolower($_POST['simple_spam'])) {
|
||||
error($config['error']['simple_spam']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user