forked from FriendsOfREDAXO/yform_spam_protection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.php
More file actions
53 lines (43 loc) · 1.62 KB
/
install.php
File metadata and controls
53 lines (43 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
rex_sql_table::get(rex::getTable('tmp_yform_spam_protection_frequency'))
->ensureColumn(new rex_sql_column('ipv4', 'int(10) unsigned', true))
->ensureColumn(new rex_sql_column('ipv6', 'varbinary(16)', true))
->ensureColumn(new rex_sql_column('createdate', 'datetime', false))
->ensureColumn(new rex_sql_column('was_blocked', 'bit(1)'))
->ensure();
if (!$this->hasConfig("notification_email")) {
$this->setConfig('notification_email', "");
}
if (!$this->hasConfig("timer")) {
$this->setConfig('timer', 1);
}
if (!$this->hasConfig("timer_session")) {
$this->setConfig('timer_session', 2);
}
if (!$this->hasConfig("timer_form")) {
$this->setConfig('timer_form', 5);
}
if (!$this->hasConfig("honeypot")) {
$this->setConfig('honeypot', 1);
}
if (!$this->hasConfig("ip_block")) {
$this->setConfig('ip_block', 1);
}
if (!$this->hasConfig("ip_block_limit")) {
$this->setConfig('ip_block_limit', 10);
}
if (!$this->hasConfig("ip_block_timer")) {
$this->setConfig('ip_block_timer', 300);
}
if (!$this->hasConfig("geo_block")) {
$this->setConfig('geo_block', 0);
}
if (!$this->hasConfig("tld_block")) {
$this->setConfig('tld_block', 0);
}
if (!$this->hasConfig("tld_list")) {
$this->setConfig('tld_list', ".ru");
}
if (!$this->hasConfig("warning")) {
$this->setConfig('warning', "Ihre Anfrage wurde als Spam erkannt und nicht zugestellt. Sollte dies irrtümlich passiert sein, wenden Sie sich bitte an den Betreiber der Website.");
}