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/Queue/Campaigns.php +21 -9 10.2.2 → 11.1.0 View file →
@@ -24,16 +24,17 @@
24 24 'name' => 'cron_reminder',
25 25 'removable' => 1,
26 26 ];
27 27 acym_enqueueMessage($message, 'warning', true, [$notification]);
28 -
29 28 }
30 29 }
31 30
31 + // Get filters data
32 32 $searchFilter = $this->getVarFiltersListing('string', 'cqueue_search', '');
33 33 $tagFilter = $this->getVarFiltersListing('string', 'cqueue_tag', '');
34 34 $status = $this->getVarFiltersListing('string', 'cqueue_status', '');
35 35
36 + // Get pagination data
36 37 $pagination = new PaginationHelper();
37 38 $campaignsPerPage = $pagination->getListLimit();
38 39 $page = $this->getVarFiltersListing('int', 'cqueue_pagination_page', 1);
39 40
@@ -47,8 +48,9 @@
47 48 'offset' => ($page - 1) * $campaignsPerPage,
48 49 ]
49 50 );
50 51
52 + // Prepare the pagination
51 53 $pagination->setStatus((int)$matchingElements['total']->total, $page, $campaignsPerPage);
52 54 $tagClass = new TagClass();
53 55
54 56 $viewData = [
@@ -81,16 +83,22 @@
81 83 'data-confirmation-message' => 'ACYM_ARE_YOU_SURE',
82 84 ],
83 85 'close'
84 86 );
85 - $otherContent = acym_modal(
86 - '<i class="acymicon-paper-plane"></i>'.acym_translation('ACYM_SEND_MAILS_MANUALLY'),
87 - '',
88 - null,
89 - 'data-reveal-larger',
90 - 'class="cell medium-6 large-shrink button" data-reload="true" data-ajax="true" data-iframe="&ctrl=queue&task=continuesend&id=0&totalsend=0"'
87 + $toolbarHelper->addModalButton(
88 + [
89 + 'button' => '<i class="acymicon-paper-plane"></i>'.esc_html(acym_translation('ACYM_SEND_MAILS_MANUALLY')),
90 + 'attributesModal' => [
91 + 'data-reveal-larger' => true,
92 + ],
93 + 'attributesButton' => [
94 + 'class' => 'cell medium-6 large-shrink button',
95 + 'data-reload' => 'true',
96 + 'data-ajax' => 'true',
97 + 'data-iframe' => '&ctrl=queue&task=continuesend&id=0&totalsend=0',
98 + ],
99 + ]
91 100 );
92 - $toolbarHelper->addOtherContent($otherContent);
93 101 $toolbarHelper->addFilterByTag($data, 'cqueue_tag', 'acym__queue__filter__tags acym__select');
94 102
95 103 $data['toolbar'] = $toolbarHelper;
96 104 if (!empty($data['tag'])) {
@@ -101,8 +109,10 @@
101 109 }
102 110
103 111 public function cancelSending(): void
104 112 {
113 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
114 +
105 115 $mailId = acym_getVar('int', 'acym__queue__cancel__mail_id');
106 116
107 117 if (!empty($mailId)) {
108 118 $hasStat = acym_loadResult('SELECT COUNT(*) FROM #__acym_user_stat WHERE mail_id = '.intval($mailId));
@@ -126,8 +136,10 @@
126 136 }
127 137
128 138 public function playPauseSending(): void
129 139 {
140 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
141 +
130 142 $active = acym_getVar('int', 'acym__queue__play_pause__active__new_value');
131 143 $campaignId = acym_getVar('int', 'acym__queue__play_pause__campaign_id');
132 144
133 145 if (!empty($campaignId)) {
@@ -145,9 +157,9 @@
145 157 }
146 158
147 159 public function emptyQueue(): void
148 160 {
149 - acym_checkToken();
161 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
150 162
151 163 $queueClass = new QueueClass();
152 164 $deleted = $queueClass->emptyQueue();
153 165 acym_enqueueMessage(acym_translationSprintf('ACYM_EMAILS_REMOVED_QUEUE', $deleted));