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/Automations/Summary.php +8 -7 10.0.1 → 11.1.0 View file →
@@ -9,9 +9,9 @@
9 9 use AcyMailing\Helpers\WorkflowHelper;
10 10
11 11 trait Summary
12 12 {
13 - public function summary()
13 + public function summary(): void
14 14 {
15 15
16 16 if (!acym_level(ACYM_ENTERPRISE)) {
17 17 acym_redirect(acym_completeLink('dashboard&task=upgrade&version=enterprise', false, true));
@@ -17,19 +17,20 @@
17 17 acym_redirect(acym_completeLink('dashboard&task=upgrade&version=enterprise', false, true));
18 18 }
19 19 }
20 20
21 - public function activeAutomation()
21 + public function activeAutomation(): void
22 22 {
23 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
24 +
23 25 $automationClass = new AutomationClass();
24 26 $automation = $automationClass->getOneById(acym_getVar('int', 'id'));
25 27 $automation->active = 1;
26 - $saved = $automationClass->save($automation);
27 - if (!empty($saved)) {
28 - acym_enqueueMessage(acym_translation('ACYM_SUCCESSFULLY_SAVED'), 'success');
29 - $this->listing();
28 + $automationId = $automationClass->save($automation);
29 + if (!empty($automationId)) {
30 + acym_enqueueMessage(acym_translation('ACYM_SUCCESSFULLY_SAVED'));
30 31 } else {
31 32 acym_enqueueMessage(acym_translation('ACYM_ERROR_SAVING'), 'error');
32 - $this->listing();
33 33 }
34 + $this->listing();
34 35 }
35 36 }