| @@ -7,13 +7,15 @@ | ||
| 7 | 7 | trait Automation |
| 8 | 8 | { |
| 9 | 9 | public function deleteMailAutomation(): void |
| 10 | 10 | { |
| 11 | + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token'); | |
| 12 | + | |
| 11 | 13 | $mailClass = new MailClass(); |
| 12 | 14 | $mailId = acym_getVar('int', 'id', 0); |
| 13 | 15 | |
| 14 | 16 | if (!empty($mailId)) { |
| 15 | - $mailClass->delete($mailId); | |
| 17 | + $mailClass->delete([$mailId]); | |
| 16 | 18 | } |
| 17 | 19 | |
| 18 | 20 | exit; |
| 19 | 21 | } |
| @@ -19,14 +21,16 @@ | ||
| 19 | 21 | } |
| 20 | 22 | |
| 21 | 23 | public function duplicateMailAutomation(): void |
| 22 | 24 | { |
| 25 | + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token'); | |
| 26 | + | |
| 23 | 27 | $mailClass = new MailClass(); |
| 24 | 28 | $mailId = acym_getVar('int', 'id', 0); |
| 25 | 29 | $prevMail = acym_getVar('int', 'previousId'); |
| 26 | 30 | |
| 27 | 31 | if (!empty($prevMail)) { |
| 28 | - $mailClass->delete($prevMail); | |
| 32 | + $mailClass->delete([$prevMail]); | |
| 29 | 33 | } |
| 30 | 34 | |
| 31 | 35 | if (empty($mailId)) { |
| 32 | 36 | acym_sendAjaxResponse(acym_translationSprintf('ACYM_NOT_FOUND', acym_translation('ACYM_ID')), [], false); |