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