PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.1
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/Mails/Automation.php +0 -43 10.2.2 → 11.1.1 View file →
@@ -1,43 +1,0 @@
1 -<?php
2 -
3 -namespace AcyMailing\Controllers\Mails;
4 -
5 -use AcyMailing\Classes\MailClass;
6 -
7 -trait Automation
8 -{
9 - public function deleteMailAutomation(): void
10 - {
11 - $mailClass = new MailClass();
12 - $mailId = acym_getVar('int', 'id', 0);
13 -
14 - if (!empty($mailId)) {
15 - $mailClass->delete($mailId);
16 - }
17 -
18 - exit;
19 - }
20 -
21 - public function duplicateMailAutomation(): void
22 - {
23 - $mailClass = new MailClass();
24 - $mailId = acym_getVar('int', 'id', 0);
25 - $prevMail = acym_getVar('int', 'previousId');
26 -
27 - if (!empty($prevMail)) {
28 - $mailClass->delete($prevMail);
29 - }
30 -
31 - if (empty($mailId)) {
32 - acym_sendAjaxResponse(acym_translationSprintf('ACYM_NOT_FOUND', acym_translation('ACYM_ID')), [], false);
33 - }
34 -
35 - $newMail = $mailClass->duplicateMail($mailId, MailClass::TYPE_AUTOMATION);
36 -
37 - if (empty($newMail)) {
38 - acym_sendAjaxResponse(acym_translation('ACYM_COULD_NOT_DUPLICATE_EMAIL'), [], false);
39 - }
40 -
41 - acym_sendAjaxResponse('', ['newMail' => $newMail]);
42 - }
43 -}