MailPoet Newsletters (Previous) - Version 2.11

Version Description

  • 2019-02-14 =
  • Improved: limiting number of "Subscription confirmation" emails sent to prevent abuse.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (Previous)
Version 2.11
Comparing to
See all releases

Code changes from version 2.10.2 to 2.11

controllers/back/campaigns.php CHANGED
@@ -2140,7 +2140,7 @@ class WYSIJA_control_back_campaigns extends WYSIJA_control_back {
2140
  $this->modelObj->query($query1);
2141
 
2142
  // unsubscribe from user where select from email_user_stat
2143
- $query2 = "UPDATE `[wysija]user` SET `status`=-1 WHERE `user_id` IN ($query)";
2144
  $this->modelObj->query($query2);
2145
 
2146
  $this->notice(__('The segment has been unsubscribed from all the lists.', WYSIJA));
2140
  $this->modelObj->query($query1);
2141
 
2142
  // unsubscribe from user where select from email_user_stat
2143
+ $query2 = "UPDATE `[wysija]user` SET `status`=-1, `count_confirmations`=0 WHERE `user_id` IN ($query)";
2144
  $this->modelObj->query($query2);
2145
 
2146
  $this->notice(__('The segment has been unsubscribed from all the lists.', WYSIJA));
core/base.php CHANGED
@@ -19,7 +19,7 @@ class WYSIJA_object{
19
  * Static variable holding core MailPoet's version
20
  * @var array
21
  */
22
- static $version = '2.10.2';
23
 
24
  function __construct(){}
25
 
19
  * Static variable holding core MailPoet's version
20
  * @var array
21
  */
22
+ static $version = '2.11';
23
 
24
  function __construct(){}
25
 
helpers/mailer.php CHANGED
@@ -582,6 +582,21 @@ class WYSIJA_help_mailer extends PHPMailer {
582
  return false;
583
  }
584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  // message id to recognise it when using the bounce
586
  $message_id=base64_encode(rand(0,9999999)).'WY'.(int)$receiver->user_id;
587
  $message_id.='SI'.(int)$this->defaultMail[$email_id]->email_id;
582
  return false;
583
  }
584
 
585
+ $max_confirmation_emails = apply_filters('wysija_subscription_max_confirmation_emails', 3);
586
+
587
+ if ($confirmEmail && !is_user_logged_in()) {
588
+ // limit the number of confirmations sent to a user to prevent abuse
589
+ if ($receiver->count_confirmations >= $max_confirmation_emails) {
590
+ // skip sending of a confirmation email
591
+ return true;
592
+ } else {
593
+ $this->subscriberClass->update(
594
+ array('count_confirmations' => ++$receiver->count_confirmations),
595
+ array('user_id' => (int)$receiver->user_id)
596
+ );
597
+ }
598
+ }
599
+
600
  // message id to recognise it when using the bounce
601
  $message_id=base64_encode(rand(0,9999999)).'WY'.(int)$receiver->user_id;
602
  $message_id.='SI'.(int)$this->defaultMail[$email_id]->email_id;
helpers/update.php CHANGED
@@ -14,7 +14,7 @@ class WYSIJA_help_update extends WYSIJA_object {
14
  '2.3.3','2.3.4',
15
  '2.4', '2.4.1', '2.4.3','2.4.4',
16
  '2.5','2.5.2','2.5.5','2.5.9.6', '2.5.9.7',
17
- '2.6', '2.6.0.8', '2.6.15', '2.7.15'
18
  );
19
  }
20
 
@@ -519,6 +519,19 @@ class WYSIJA_help_update extends WYSIJA_object {
519
  return true;
520
  break;
521
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
  default:
523
  return false;
524
  }
14
  '2.3.3','2.3.4',
15
  '2.4', '2.4.1', '2.4.3','2.4.4',
16
  '2.5','2.5.2','2.5.5','2.5.9.6', '2.5.9.7',
17
+ '2.6', '2.6.0.8', '2.6.15', '2.7.15', '2.11'
18
  );
19
  }
20
 
519
  return true;
520
  break;
521
 
522
+ case '2.11':
523
+ $alter_queries = array();
524
+ $alter_queries[] = 'ALTER TABLE [wysija]user ADD COLUMN `count_confirmations` INT unsigned NOT NULL DEFAULT 0;';
525
+ $errors = $this->run_update_queries( $alter_queries );
526
+
527
+ if ( $errors ) {
528
+ $this->error( implode( $errors, "\n" ) );
529
+ return false;
530
+ }
531
+
532
+ return true;
533
+ break;
534
+
535
  default:
536
  return false;
537
  }
helpers/user.php CHANGED
@@ -58,7 +58,7 @@ class WYSIJA_help_user extends WYSIJA_object {
58
  $model_user_list->update(array('unsub_date' => time(), 'sub_date' => 0), array('user_id' => $user_id, 'unsub_date' => 0));
59
 
60
  // the data we update on the user row
61
- $user_updated_data = array('status' => $status);
62
  }
63
 
64
  $modelUser = WYSIJA::get('user', 'model');
58
  $model_user_list->update(array('unsub_date' => time(), 'sub_date' => 0), array('user_id' => $user_id, 'unsub_date' => 0));
59
 
60
  // the data we update on the user row
61
+ $user_updated_data = array('status' => $status, 'count_confirmations' => 0);
62
  }
63
 
64
  $modelUser = WYSIJA::get('user', 'model');
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MailPoet 2
4
  Plugin URI: http://www.mailpoet.com/
5
  Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
6
- Version: 2.10.2
7
  Author: MailPoet
8
  Author URI: http://www.mailpoet.com/
9
  License: GPLv2 or later
3
  Plugin Name: MailPoet 2
4
  Plugin URI: http://www.mailpoet.com/
5
  Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
6
+ Version: 2.11
7
  Author: MailPoet
8
  Author URI: http://www.mailpoet.com/
9
  License: GPLv2 or later
languages/wysija-newsletters-az.mo ADDED
Binary file
languages/wysija-newsletters-nl_NL.mo CHANGED
Binary file
models/user.php CHANGED
@@ -18,6 +18,7 @@ class WYSIJA_model_user extends WYSIJA_model{
18
  'confirmed_at' => array(),
19
  'last_opened' => array(),
20
  'last_clicked' => array(),
 
21
  );
22
  var $searchable = array('email','firstname', 'lastname');
23
 
18
  'confirmed_at' => array(),
19
  'last_opened' => array(),
20
  'last_clicked' => array(),
21
+ 'count_confirmations' => array('type'=>'integer'),
22
  );
23
  var $searchable = array('email','firstname', 'lastname');
24
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wysija
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 3.5
5
  Tested up to: 4.9
6
- Stable tag: 2.10.2
7
  Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
8
 
9
  == Description ==
@@ -113,6 +113,9 @@ Our [support site](https://www.mailpoet.com/support) has plenty of articles and
113
 
114
  == Changelog ==
115
 
 
 
 
116
  = 2.10.2 - 2018-10-17 =
117
  * Fixed: stuck "What's new" page so you could still use the rest of the plugin.
118
 
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 3.5
5
  Tested up to: 4.9
6
+ Stable tag: 2.11
7
  Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
8
 
9
  == Description ==
113
 
114
  == Changelog ==
115
 
116
+ = 2.11 - 2019-02-14 =
117
+ * Improved: limiting number of "Subscription confirmation" emails sent to prevent abuse.
118
+
119
  = 2.10.2 - 2018-10-17 =
120
  * Fixed: stuck "What's new" page so you could still use the rest of the plugin.
121
 
sql/install.sql CHANGED
@@ -23,6 +23,7 @@ CREATE TABLE IF NOT EXISTS `user` (
23
  `created_at` INT unsigned NULL,
24
  `status` TINYINT NOT NULL DEFAULT 0,
25
  `domain` VARCHAR(255) NULL DEFAULT '',
 
26
  PRIMARY KEY (`user_id`),
27
  UNIQUE KEY `EMAIL_UNIQUE` (`email`)
28
  ) /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci*/;
23
  `created_at` INT unsigned NULL,
24
  `status` TINYINT NOT NULL DEFAULT 0,
25
  `domain` VARCHAR(255) NULL DEFAULT '',
26
+ `count_confirmations` INT unsigned NOT NULL DEFAULT 0,
27
  PRIMARY KEY (`user_id`),
28
  UNIQUE KEY `EMAIL_UNIQUE` (`email`)
29
  ) /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci*/;
sql/uninstall.sql CHANGED
@@ -27,3 +27,5 @@ DROP TABLE `url_mail`;
27
  DROP TABLE `form`;
28
  -- QUERY ---
29
  DROP TABLE `custom_field`;
 
 
27
  DROP TABLE `form`;
28
  -- QUERY ---
29
  DROP TABLE `custom_field`;
30
+ -- QUERY ---
31
+ DROP TABLE `subscriber_ips`;
views/back/mp3.php CHANGED
@@ -34,15 +34,6 @@ class WYSIJA_view_back_mp3 extends WYSIJA_view_back{
34
  <p style="margin: 2em 0 2em 0">(<?php echo __('It installs as a separate plugins, so your existing MailPoet 2 plugin will continue to work', WYSIJA); ?>)
35
  </div></div>
36
 
37
- <hr>
38
-
39
- <div class="feature-section one-col"><div class="col center">
40
- <h2><?php echo __('Upgrade to Premium – Save 50%', WYSIJA); ?></h2>
41
- <p><?php echo __('For a limited time only, pay just $50 for MailPoet Premium (usually $99 a year for one site!)', WYSIJA); ?>
42
- <p><b><?php echo __('Hurry, this one-time offer is only valid until 30 November.', WYSIJA); ?></b>
43
- <p><?php echo $this->replace_link_shortcode(__('[link]Install MailPoet 3[/link] to claim your discount.', WYSIJA), 'plugin-install.php?s=mailpoet&tab=search&type=author'); ?>
44
- </div></div>
45
-
46
  <hr style="margin-bottom: 2em">
47
 
48
  <div class="floating-header-section">
@@ -93,7 +84,7 @@ class WYSIJA_view_back_mp3 extends WYSIJA_view_back{
93
  </div>
94
  <div class="section-item">
95
  <h3><?php echo __('Need Help Switching?', WYSIJA); ?></h3>
96
- <p><?php echo __('We’re happy to chat with you! With team members spread around the world, MailPoet offers fast, reliable and friendly support via email and live chat. Prefer to DIY? Our knowledge base is always online. Reach out any time — we’re real humans and here to help.', WYSIJA); ?>
97
  </div>
98
  </div>
99
  </div>
34
  <p style="margin: 2em 0 2em 0">(<?php echo __('It installs as a separate plugins, so your existing MailPoet 2 plugin will continue to work', WYSIJA); ?>)
35
  </div></div>
36
 
 
 
 
 
 
 
 
 
 
37
  <hr style="margin-bottom: 2em">
38
 
39
  <div class="floating-header-section">
84
  </div>
85
  <div class="section-item">
86
  <h3><?php echo __('Need Help Switching?', WYSIJA); ?></h3>
87
+ <p><?php echo __('We’re happy to chat with you! With team members spread around the world, MailPoet offers fast, reliable and friendly support via email. Prefer to DIY? Our knowledge base is always online. Reach out any time — we’re real humans and here to help.', WYSIJA); ?>
88
  </div>
89
  </div>
90
  </div>