Skip to content

Commit ba70ad0

Browse files
author
davydovct
committed
Release 3.10.4
2 parents 5fca016 + 184c2de commit ba70ad0

File tree

5 files changed

+42
-34
lines changed

5 files changed

+42
-34
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.10.3
4+
1C Bitrix anti-spam mod. 3.10.4
55

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

cleantalk.antispam/custom_config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CleantalkCustomConfig
77

88
function __construct()
99
{
10-
$this->cleantalk_url_exclusions = explode(',', trim($this->cleantalk_url_exclusions));
10+
$this->cleantalk_url_exclusions = (!empty($this->cleantalk_url_exclusions) ? explode(',', trim($this->cleantalk_url_exclusions)) : null);
1111
}
1212
public function get_url_exclusions()
1313
{

cleantalk.antispam/include.php

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -909,31 +909,35 @@ function OnEventLogGetAuditTypesHandler(){
909909
function OnEndBufferContentHandler(&$content) {
910910
$custom_config = new CleantalkCustomConfig();
911911
$url_exclusion = $custom_config->get_url_exclusions();
912-
foreach ($url_exclusion as $key=>$value)
913-
if (strpos($_SERVER['REQUEST_URI'],$value) !== false)
914-
{
915-
if (isset($_COOKIE['ct_checkjs'])) {
916-
unset($_COOKIE['ct_checkjs']);
917-
setcookie('ct_checkjs', null, -1, '/');
918-
}
919-
if (isset($_COOKIE['ct_fkp_timestamp'])) {
920-
unset($_COOKIE['ct_fkp_timestamp']);
921-
setcookie('ct_fkp_timestamp', null, -1, '/');
922-
}
923-
if (isset($_COOKIE['ct_pointer_data'])) {
924-
unset($_COOKIE['ct_pointer_data']);
925-
setcookie('ct_pointer_data', null, -1, '/');
926-
}
927-
if (isset($_COOKIE['ct_ps_timestamp'])) {
928-
unset($_COOKIE['ct_ps_timestamp']);
929-
setcookie('ct_ps_timestamp', null, -1, '/');
930-
}
931-
if (isset($_COOKIE['ct_timezone'])) {
932-
unset($_COOKIE['ct_timezone']);
933-
setcookie('ct_timezone', null, -1, '/');
934-
}
935-
return;
936-
}
912+
if ($url_exclusion)
913+
{
914+
foreach ($url_exclusion as $key=>$value)
915+
if (strpos($_SERVER['REQUEST_URI'],$value) !== false)
916+
{
917+
if (isset($_COOKIE['ct_checkjs'])) {
918+
unset($_COOKIE['ct_checkjs']);
919+
setcookie('ct_checkjs', null, -1, '/');
920+
}
921+
if (isset($_COOKIE['ct_fkp_timestamp'])) {
922+
unset($_COOKIE['ct_fkp_timestamp']);
923+
setcookie('ct_fkp_timestamp', null, -1, '/');
924+
}
925+
if (isset($_COOKIE['ct_pointer_data'])) {
926+
unset($_COOKIE['ct_pointer_data']);
927+
setcookie('ct_pointer_data', null, -1, '/');
928+
}
929+
if (isset($_COOKIE['ct_ps_timestamp'])) {
930+
unset($_COOKIE['ct_ps_timestamp']);
931+
setcookie('ct_ps_timestamp', null, -1, '/');
932+
}
933+
if (isset($_COOKIE['ct_timezone'])) {
934+
unset($_COOKIE['ct_timezone']);
935+
setcookie('ct_timezone', null, -1, '/');
936+
}
937+
return;
938+
}
939+
}
940+
937941
if(!defined("ADMIN_SECTION") && COption::GetOptionString( 'cleantalk.antispam', 'status', 0 ) == 1 && strpos($content,'<head>') !== false)
938942
{
939943
if (!session_id()) session_start();
@@ -1081,9 +1085,13 @@ static function CheckAllBefore(&$arEntity, $bSendEmail = FALSE) {
10811085
}
10821086
$custom_config = new CleantalkCustomConfig();
10831087
$url_exclusion = $custom_config->get_url_exclusions();
1084-
foreach ($url_exclusion as $key=>$value)
1085-
if (strpos($_SERVER['REQUEST_URI'],$value) !== false)
1086-
return;
1088+
if ($url_exclusion)
1089+
{
1090+
foreach ($url_exclusion as $key=>$value)
1091+
if (strpos($_SERVER['REQUEST_URI'],$value) !== false)
1092+
return;
1093+
}
1094+
10871095
$ct_key = COption::GetOptionString('cleantalk.antispam', 'key', '0');
10881096
$ct_ws = self::GetWorkServer();
10891097

@@ -1150,7 +1158,7 @@ static function CheckAllBefore(&$arEntity, $bSendEmail = FALSE) {
11501158
$ct_request->sender_email = isset($arEntity['sender_email']) ? $arEntity['sender_email'] : '';
11511159
$ct_request->sender_nickname = isset($arEntity['sender_nickname']) ? $arEntity['sender_nickname'] : '';
11521160
$ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
1153-
$ct_request->agent = 'bitrix-3103';
1161+
$ct_request->agent = 'bitrix-3104';
11541162
$ct_request->response_lang = 'ru';
11551163
$ct_request->js_on = $checkjs;
11561164
$ct_request->sender_info = $sender_info;
@@ -1432,7 +1440,7 @@ static function SendFeedback($module, $id, $feedback) {
14321440

14331441
$ct_request = new CleantalkRequest();
14341442
$ct_request->auth_key = $ct_key;
1435-
$ct_request->agent = 'bitrix-3103';
1443+
$ct_request->agent = 'bitrix-3104';
14361444
$ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
14371445
$ct_request->feedback = $request_id . ':' . ($feedback == 'Y' ? '1' : '0');
14381446

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
$arModuleVersion = array(
3-
"VERSION" => "3.10.3",
3+
"VERSION" => "3.10.4",
44
"VERSION_DATE" => "2018-02-14 24:00:00"
55
);

cleantalk.antispam/options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141

4242
// Send empty feedback for version comparison in Dashboard
43-
$result = CleantalkHelper::sendEmptyFeedback($new_key, 'bitrix-3103');
43+
$result = CleantalkHelper::sendEmptyFeedback($new_key, 'bitrix-3104');
4444

4545
/**
4646
* Set settings when submit

0 commit comments

Comments
 (0)