@@ -909,31 +909,35 @@ function OnEventLogGetAuditTypesHandler(){
909
909
function OnEndBufferContentHandler (&$ content ) {
910
910
$ custom_config = new CleantalkCustomConfig ();
911
911
$ 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
+
937
941
if (!defined ("ADMIN_SECTION " ) && COption::GetOptionString ( 'cleantalk.antispam ' , 'status ' , 0 ) == 1 && strpos ($ content ,'<head> ' ) !== false )
938
942
{
939
943
if (!session_id ()) session_start ();
@@ -1081,9 +1085,13 @@ static function CheckAllBefore(&$arEntity, $bSendEmail = FALSE) {
1081
1085
}
1082
1086
$ custom_config = new CleantalkCustomConfig ();
1083
1087
$ 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
+
1087
1095
$ ct_key = COption::GetOptionString ('cleantalk.antispam ' , 'key ' , '0 ' );
1088
1096
$ ct_ws = self ::GetWorkServer ();
1089
1097
@@ -1150,7 +1158,7 @@ static function CheckAllBefore(&$arEntity, $bSendEmail = FALSE) {
1150
1158
$ ct_request ->sender_email = isset ($ arEntity ['sender_email ' ]) ? $ arEntity ['sender_email ' ] : '' ;
1151
1159
$ ct_request ->sender_nickname = isset ($ arEntity ['sender_nickname ' ]) ? $ arEntity ['sender_nickname ' ] : '' ;
1152
1160
$ ct_request ->sender_ip = $ ct ->ct_session_ip ($ _SERVER ['REMOTE_ADDR ' ]);
1153
- $ ct_request ->agent = 'bitrix-3103 ' ;
1161
+ $ ct_request ->agent = 'bitrix-3104 ' ;
1154
1162
$ ct_request ->response_lang = 'ru ' ;
1155
1163
$ ct_request ->js_on = $ checkjs ;
1156
1164
$ ct_request ->sender_info = $ sender_info ;
@@ -1432,7 +1440,7 @@ static function SendFeedback($module, $id, $feedback) {
1432
1440
1433
1441
$ ct_request = new CleantalkRequest ();
1434
1442
$ ct_request ->auth_key = $ ct_key ;
1435
- $ ct_request ->agent = 'bitrix-3103 ' ;
1443
+ $ ct_request ->agent = 'bitrix-3104 ' ;
1436
1444
$ ct_request ->sender_ip = $ ct ->ct_session_ip ($ _SERVER ['REMOTE_ADDR ' ]);
1437
1445
$ ct_request ->feedback = $ request_id . ': ' . ($ feedback == 'Y ' ? '1 ' : '0 ' );
1438
1446
0 commit comments