Skip to content

Commit ed784ab

Browse files
committed
Fix: firewall update.
1 parent c3652f5 commit ed784ab

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bitrix-antispam
22
===============
33

4-
1C Bitrix anti-spam mod. 3.11.13
4+
1C Bitrix anti-spam mod. 3.11.14
55

66
Information page,
77
http://cleantalk.org/bitrix-antispam-module-bez-captcha

cleantalk.antispam/include.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Cleantalk\Common\Firewall\Modules\SFW;
2323

2424
if ( ! defined( 'CLEANTALK_USER_AGENT' ) )
25-
define( 'CLEANTALK_USER_AGENT', 'bitrix-31113' );
25+
define( 'CLEANTALK_USER_AGENT', 'bitrix-31114' );
2626

2727
define('APBCT_TBL_FIREWALL_DATA', 'cleantalk_sfw'); // Table with firewall data.
2828
define('APBCT_TBL_FIREWALL_LOG', 'cleantalk_sfw_logs'); // Table with firewall logs.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
$arModuleVersion = array(
3-
"VERSION" => "3.11.13",
4-
"VERSION_DATE" => "2021-04-05 10:00:00"
3+
"VERSION" => "3.11.14",
4+
"VERSION_DATE" => "2021-04-06 10:00:00"
55
);

cleantalk.antispam/lib/Cleantalk/Common/Firewall/FirewallUpdater.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function update()
8989
if( Get::get('spbc_remote_call_action') == 'sfw_update__write_base' &&
9090
! Get::get('firewall_updating_id') &&
9191
$fw_stats['firewall_updating_id'] &&
92-
time() - $fw_stats['firewall_updating_last_start'] < 60 ){
92+
time() - $fw_stats['firewall_updating_last_start'] < 0 ){
9393
return true;
9494
}
9595

@@ -107,7 +107,7 @@ public function update()
107107
}
108108

109109
// Set new update ID
110-
if( ! $fw_stats['firewall_updating_id'] || time() - $fw_stats['firewall_updating_last_start'] > 300 ){
110+
if( Get::get('spbc_remote_call_action') == 'sfw_update__write_base' && (! $fw_stats['firewall_updating_id'] || time() - $fw_stats['firewall_updating_last_start'] > 300)) {
111111
$helper::setFwStats(
112112
array(
113113
'firewall_updating_id' => md5( rand( 0, 100000 ) ),

0 commit comments

Comments
 (0)