Newsletter - Version 4.9.8

Version Description

=

  • Fixed the antibot option

=

Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 4.9.8
Comparing to
See all releases

Code changes from version 4.9.7 to 4.9.8

plugin.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
- Version: 4.9.7
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -14,7 +14,7 @@
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
- define('NEWSLETTER_VERSION', '4.9.7');
18
 
19
  global $wpdb, $newsletter;
20
 
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
+ Version: 4.9.8
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
+ define('NEWSLETTER_VERSION', '4.9.8');
18
 
19
  global $wpdb, $newsletter;
20
 
readme.txt CHANGED
@@ -85,6 +85,10 @@ Thank you, The Newsletter Team
85
 
86
  == Changelog ==
87
 
 
 
 
 
88
  == 4.9.7 ==
89
 
90
  * Fixed setup script throwing a debug notice
85
 
86
  == Changelog ==
87
 
88
+ == 4.9.8 ==
89
+
90
+ * Fixed the antibot option
91
+
92
  == 4.9.7 ==
93
 
94
  * Fixed setup script throwing a debug notice
statistics/statistics.php CHANGED
@@ -279,10 +279,14 @@ class NewsletterStatistics extends NewsletterModule {
279
  $wpdb->query($wpdb->prepare("update " . NEWSLETTER_EMAILS_TABLE . " set send_on=unix_timestamp(created) where id=%d limit 1", $email->id));
280
  $email = $this->get_email($email->id);
281
  }
 
 
 
 
282
 
283
  $count = $wpdb->get_var($wpdb->prepare("select count(*) from " . NEWSLETTER_SENT_TABLE . " where email_id=%d", $email->id));
284
 
285
- if (!$count) {
286
  return;
287
  }
288
 
279
  $wpdb->query($wpdb->prepare("update " . NEWSLETTER_EMAILS_TABLE . " set send_on=unix_timestamp(created) where id=%d limit 1", $email->id));
280
  $email = $this->get_email($email->id);
281
  }
282
+
283
+ if ($email->status == 'sending') {
284
+ return;
285
+ }
286
 
287
  $count = $wpdb->get_var($wpdb->prepare("select count(*) from " . NEWSLETTER_SENT_TABLE . " where email_id=%d", $email->id));
288
 
289
+ if ($count) {
290
  return;
291
  }
292
 
subscription/options.php CHANGED
@@ -277,7 +277,7 @@ if (empty($controls->data['page'])) {
277
  <tr valign="top">
278
  <th>Disable antibot/antispam?</th>
279
  <td>
280
- <?php $controls->checkbox('antibot_disable'); ?>
281
  <p class="description">
282
  Required for ajax form subsmissions.
283
  </p>
277
  <tr valign="top">
278
  <th>Disable antibot/antispam?</th>
279
  <td>
280
+ <?php $controls->yesno('antibot_disable'); ?>
281
  <p class="description">
282
  Required for ajax form subsmissions.
283
  </p>
subscription/subscription.php CHANGED
@@ -87,8 +87,7 @@ class NewsletterSubscription extends NewsletterModule {
87
  // normal subscription
88
  case 's':
89
  case 'subscribe':
90
- if (isset($this->options['antibot_disable']) || $this->antibot_form_check()) {
91
-
92
  $user = $this->subscribe();
93
 
94
  if ($user->status == 'E')
@@ -100,7 +99,6 @@ class NewsletterSubscription extends NewsletterModule {
100
  if ($user->status == 'S')
101
  $this->show_message('confirmation', $user->id);
102
  } else {
103
-
104
  $this->request_to_antibot_form('Subscribe');
105
  }
106
  die();
87
  // normal subscription
88
  case 's':
89
  case 'subscribe':
90
+ if (!empty($this->options['antibot_disable']) || $this->antibot_form_check()) {
 
91
  $user = $this->subscribe();
92
 
93
  if ($user->status == 'E')
99
  if ($user->status == 'S')
100
  $this->show_message('confirmation', $user->id);
101
  } else {
 
102
  $this->request_to_antibot_form('Subscribe');
103
  }
104
  die();