Spam protection, AntiSpam, FireWall by CleanTalk - Version 2.30

Version Description

2014-01-13 = * Changed: Improved servers connection logic. * Fixed: Antispam test for Fomidable forms.

Download this release

Release Info

Developer shagimuratov
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 2.30
Comparing to
See all releases

Code changes from version 2.28 to 2.30

Files changed (3) hide show
  1. cleantalk.class.php +16 -16
  2. cleantalk.php +4 -4
  3. readme.txt +10 -2
cleantalk.class.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Cleantalk base class
4
  *
5
- * @version 1.21.14
6
  * @package Cleantalk
7
  * @subpackage Base
8
  * @author Сleantalk team (welcome@cleantalk.ru)
@@ -174,7 +174,7 @@ class CleantalkResponse {
174
  $this->account_status = (isset($obj->account_status)) ? $obj->account_status : -1;
175
 
176
  if ($this->errno !== 0 && $this->errstr !== null && $this->comment === null)
177
- $this->comment = '*** ' . $this->errstr . ' Automoderator cleantalk.org ***';
178
  }
179
  }
180
 
@@ -616,7 +616,8 @@ class Cleantalk {
616
 
617
  $result = curl_exec($ch);
618
  curl_close($ch);
619
- } else {
 
620
  $allow_url_fopen = ini_get('allow_url_fopen');
621
  if (function_exists('file_get_contents') && isset($allow_url_fopen) && $allow_url_fopen == '1') {
622
  $opts = array('http' =>
@@ -630,26 +631,24 @@ class Cleantalk {
630
 
631
  $context = stream_context_create($opts);
632
  $result = @file_get_contents($url, false, $context);
633
- } else {
634
- $response = null;
635
- $response['errno'] = 1;
636
- $response['errstr'] = 'No CURL support compiled in. Disabled allow_url_fopen in php.ini.';
637
- $response = json_decode(json_encode($response));
638
-
639
- return $response;
640
- }
641
  }
642
-
 
 
 
 
 
 
 
 
643
 
644
  $errstr = null;
645
  $response = json_decode($result);
646
  if ($result !== false && is_object($response)) {
647
  $response->errno = 0;
648
  $response->errstr = $errstr;
649
  } else {
650
- if ($result === false)
651
- $errstr = 'Failed connect to ' . $url . '.';
652
- else
653
- $errstr = $result;
654
 
655
  $response = null;
656
  $response['errno'] = 1;
@@ -657,6 +656,7 @@ class Cleantalk {
657
  $response = json_decode(json_encode($response));
658
  }
659
 
 
660
  return $response;
661
  }
662
 
2
  /**
3
  * Cleantalk base class
4
  *
5
+ * @version 1.21.15
6
  * @package Cleantalk
7
  * @subpackage Base
8
  * @author Сleantalk team (welcome@cleantalk.ru)
174
  $this->account_status = (isset($obj->account_status)) ? $obj->account_status : -1;
175
 
176
  if ($this->errno !== 0 && $this->errstr !== null && $this->comment === null)
177
+ $this->comment = '*** ' . $this->errstr . ' Antispam service cleantalk.org ***';
178
  }
179
  }
180
 
616
 
617
  $result = curl_exec($ch);
618
  curl_close($ch);
619
+ }
620
+ if (!$result) {
621
  $allow_url_fopen = ini_get('allow_url_fopen');
622
  if (function_exists('file_get_contents') && isset($allow_url_fopen) && $allow_url_fopen == '1') {
623
  $opts = array('http' =>
631
 
632
  $context = stream_context_create($opts);
633
  $result = @file_get_contents($url, false, $context);
634
+ }
 
 
 
 
 
 
 
635
  }
636
+ if (!$result) {
637
+ $response = null;
638
+ $response['errno'] = 1;
639
+ $response['errstr'] = 'No CURL support compiled in. Disabled allow_url_fopen in php.ini.';
640
+ $response = json_decode(json_encode($response));
641
+
642
+ return $response;
643
+ }
644
+
645
 
646
  $errstr = null;
647
  $response = json_decode($result);
648
  if ($result !== false && is_object($response)) {
649
  $response->errno = 0;
650
  $response->errstr = $errstr;
651
  } else {
652
+ $errstr = 'Failed connect to ' . $url . '.' . ' ' . $result;
 
 
 
653
 
654
  $response = null;
655
  $response['errno'] = 1;
656
  $response = json_decode(json_encode($response));
657
  }
658
 
659
+
660
  return $response;
661
  }
662
 
cleantalk.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org/wordpress
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
- Version: 2.28
7
  Author: СleanTalk <welcome@cleantalk.ru>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
- $ct_agent_version = 'wordpress-228';
12
  $ct_checkjs_frm = 'ct_checkjs_frm';
13
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
14
  $ct_session_request_id_label = 'request_id';
@@ -280,7 +280,7 @@ function ct_frm_entries_footer_scripts($fields, $form) {
280
  global $current_user, $ct_checkjs_frm;
281
 
282
  $options = ct_get_options();
283
- if (ct_is_user_enable() === false || $options['formidable_test'] == 0) {
284
  return false;
285
  }
286
 
@@ -306,7 +306,7 @@ function ct_frm_validate_entry ($errors, $values) {
306
  global $wpdb, $current_user, $ct_agent_version, $ct_checkjs_frm;
307
 
308
  $options = ct_get_options();
309
- if (ct_is_user_enable() === false || $options['formidable_test'] == 0) {
310
  return false;
311
  }
312
 
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org/wordpress
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
+ Version: 2.30
7
  Author: СleanTalk <welcome@cleantalk.ru>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
+ $ct_agent_version = 'wordpress-230';
12
  $ct_checkjs_frm = 'ct_checkjs_frm';
13
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
14
  $ct_session_request_id_label = 'request_id';
280
  global $current_user, $ct_checkjs_frm;
281
 
282
  $options = ct_get_options();
283
+ if ($options['contact_forms_test'] == 0) {
284
  return false;
285
  }
286
 
306
  global $wpdb, $current_user, $ct_agent_version, $ct_checkjs_frm;
307
 
308
  $options = ct_get_options();
309
+ if ($options['contact_forms_test'] == 0) {
310
  return false;
311
  }
312
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: znaeff, shagimuratov
3
  Tags: antispam, anti-spam, spam, captcha, comment, comments, wpmu, network, multisite, forms, registration, login, contact form, buddypress, bbpress, admin, user, users, post, posts, wordpress, javascript, plugin, blacklists, cloud, math, signup, akismet, JetPack, WooCommerce
4
  Requires at least: 3.0
5
- Tested up to: 3.8
6
- Stable tag: 2.28
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -86,6 +86,10 @@ Use other antispam plugins not necessarily, because CleanTalk stops 99.99% of sp
86
 
87
  == Changelog ==
88
 
 
 
 
 
89
  = 2.28 2013-12-19 =
90
  * New: Added protection against spam bots for WooCommerce review form.
91
  * Fixed: JavaScript antispam logic for WooCommerce review form.
@@ -226,6 +230,10 @@ Use other antispam plugins not necessarily, because CleanTalk stops 99.99% of sp
226
  * First version
227
 
228
  == Upgrade Notice ==
 
 
 
 
229
  = 2.27 2013-12-06 =
230
  * New: Added protection against spam bots for JetPack Contact form.
231
  * Fixed: JavaScript antispam logic for registrations and Contact form 7.
2
  Contributors: znaeff, shagimuratov
3
  Tags: antispam, anti-spam, spam, captcha, comment, comments, wpmu, network, multisite, forms, registration, login, contact form, buddypress, bbpress, admin, user, users, post, posts, wordpress, javascript, plugin, blacklists, cloud, math, signup, akismet, JetPack, WooCommerce
4
  Requires at least: 3.0
5
+ Tested up to: 3.8.1
6
+ Stable tag: 2.30
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
86
 
87
  == Changelog ==
88
 
89
+ = 2.30 2014-01-13 =
90
+ * Changed: Improved servers connection logic.
91
+ * Fixed: Antispam test for Fomidable forms.
92
+
93
  = 2.28 2013-12-19 =
94
  * New: Added protection against spam bots for WooCommerce review form.
95
  * Fixed: JavaScript antispam logic for WooCommerce review form.
230
  * First version
231
 
232
  == Upgrade Notice ==
233
+ = 2.30 2014-01-13 =
234
+ * Changed: Improved servers connection logic.
235
+ * Fixed: Antispam test for Fomidable forms.
236
+
237
  = 2.27 2013-12-06 =
238
  * New: Added protection against spam bots for JetPack Contact form.
239
  * Fixed: JavaScript antispam logic for registrations and Contact form 7.