PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | back/Controllers/FollowupsController.php +5 -5 10.0.1 → 11.1.0 View file →
@@ -10,9 +10,9 @@
10 10 use AcyMailing\Core\AcymController;
11 11
12 12 class FollowupsController extends AcymController
13 13 {
14 - public function getEmailsListing()
14 + public function getEmailsListing(): void
15 15 {
16 16 $id = acym_getVar('int', 'id', 0);
17 17 if (empty($id)) {
18 18 acym_sendAjaxResponse(acym_translation('ACYM_FOLLOWUP_NOT_FOUND'), [], false);
@@ -18,9 +18,9 @@
18 18 acym_sendAjaxResponse(acym_translation('ACYM_FOLLOWUP_NOT_FOUND'), [], false);
19 19 }
20 20
21 21 $followupClass = new FollowupClass();
22 - $emailIds = $followupClass->getEmailsByIds($id);
22 + $emailIds = $followupClass->getEmailsByIds([$id]);
23 23 if (empty($emailIds)) {
24 24 acym_sendAjaxResponse(acym_translation('ACYM_NO_EMAIL_FOR_FOLLOWUP'), [], false);
25 25 }
26 26
@@ -61,11 +61,11 @@
61 61
62 62 acym_sendAjaxResponse('', $data);
63 63 }
64 64
65 - public function addQueueAjax()
65 + public function addQueueAjax(): void
66 66 {
67 - acym_checkToken();
67 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
68 68
69 69 $emailId = acym_getVar('int', 'emailId', 0);
70 70 if (empty($emailId)) {
71 71 acym_sendAjaxResponse(acym_translation('ACYM_EMAIL_NOT_FOUND'), [], false);
@@ -73,9 +73,9 @@
73 73
74 74 $followupClass = new FollowupClass();
75 75 $queued = $followupClass->queueForSubscribers($emailId);
76 76
77 - if ($queued === false) {
77 + if ($queued === null) {
78 78 acym_sendAjaxResponse(acym_translation('ACYM_ERROR_ADD_QUEUE'), [], false);
79 79 }
80 80
81 81 acym_sendAjaxResponse(acym_translationSprintf('ACYM_EMAILS_ADDED_QUEUE', $queued));