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/QueueController.php +11 -6 10.1.4 → 11.1.0 View file →
@@ -30,9 +30,13 @@
30 30 }
31 31
32 32 public function continuesend(): void
33 33 {
34 - if ($this->config->get('queue_type') == 'onlyauto') {
34 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
35 +
36 + //Are we configured to use the automatic send process only?
37 + //If so, we don't allow the user to access this feature!
38 + if ($this->config->get('queue_type') === 'onlyauto') {
35 39 acym_setNoTemplate();
36 40 acym_display(acym_translation('ACYM_ONLYAUTOPROCESS'), 'warning');
37 41
38 42 exit;
@@ -37,13 +41,12 @@
37 41
38 42 exit;
39 43 }
40 44
41 - $newcrontime = time() + 120;
42 - if ($this->config->get('cron_next') < $newcrontime) {
43 - $newValue = new \stdClass();
44 - $newValue->cron_next = $newcrontime;
45 - $this->config->save($newValue);
45 + //we move the next cron task so that we won't have problem with double send process
46 + $newCronTime = time() + 120;
47 + if ($this->config->get('cron_next') < $newCronTime) {
48 + $this->config->saveConfig(['cron_next' => $newCronTime]);
46 49 }
47 50
48 51 $mailid = acym_getCID('id');
49 52
@@ -65,11 +68,13 @@
65 68 $queueHelper->report = true;
66 69 $queueHelper->total = (int)$totalSend;
67 70 $queueHelper->start = $alreadySent;
68 71 $queueHelper->pause = (int)$this->config->get('queue_pause', 0);
72 + // ->Process will exit the current page if it needs to be continued
69 73 $queueHelper->fromManual = true;
70 74 $queueHelper->process();
71 75
76 + //We should never be there... but if the user tries to resume the send process and the messages are not ready to be sent then it will land here...
72 77 acym_setNoTemplate();
73 78 exit;
74 79 }
75 80 }