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/BouncesController.php +9 -9 10.0.1 → 11.1.0 View file →
@@ -14,10 +14,10 @@
14 14 use Rule;
15 15 use MailboxActionsListing;
16 16 use MailboxActionsEdition;
17 17
18 - private $runBounce = false;
19 - private $mailboxReport = [];
18 + private bool $runBounce = false;
19 + private array $mailboxReport = [];
20 20
21 21 public function __construct()
22 22 {
23 23 parent::__construct();
@@ -29,9 +29,8 @@
29 29
30 30 public function storeRedirectListing(bool $fromListing = false): void
31 31 {
32 32 $variableName = 'ctrl_mailboxes_stored';
33 - acym_session();
34 33 $taskToStore = [
35 34 '',
36 35 'bounces',
37 36 'mailboxes',
@@ -40,10 +39,11 @@
40 39 if (!in_array($currentTask, $taskToStore) && !$fromListing) {
41 40 return;
42 41 }
43 42
44 - if ((empty($currentTask) || !in_array($currentTask, $taskToStore)) && !empty($_SESSION[$variableName])) {
45 - $taskToGo = is_array($_SESSION[$variableName]) ? $_SESSION[$variableName]['task'] : $_SESSION[$variableName];
43 + $controller = acym_getVar('RAW', $variableName, null, 'SESSION');
44 + if ((empty($currentTask) || !in_array($currentTask, $taskToStore)) && !empty($controller)) {
45 + $taskToGo = is_array($controller) ? $controller['task'] : $controller;
46 46 $link = acym_completeLink('bounces&task='.$taskToGo, false, true);
47 47 if ($this->runBounce) {
48 48 $link .= '&runBounce=1';
49 49 }
@@ -52,9 +52,9 @@
52 52 } else {
53 53 if (empty($currentTask) || !in_array($currentTask, $taskToStore)) {
54 54 $currentTask = 'bounces';
55 55 }
56 - $_SESSION[$variableName] = $currentTask;
56 + acym_setSession($variableName, $currentTask);
57 57 }
58 58
59 59 $taskToCall = is_array($currentTask) ? $currentTask['task'] : $currentTask;
60 60 if ($fromListing && method_exists($this, $taskToCall)) {
@@ -61,12 +61,12 @@
61 61 $this->$taskToCall();
62 62 }
63 63 }
64 64
65 - private function getAllParamsRequest(&$data)
65 + private function getAllParamsRequest(array &$data): void
66 66 {
67 67 $data['search'] = $this->getVarFiltersListing('string', 'mailboxes_search', '');
68 68 $data['status'] = $this->getVarFiltersListing('string', 'mailboxes_status', '');
69 - $data['ordering'] = $this->getVarFiltersListing('string', 'mailboxes_ordering', 'id');
70 - $data['orderingSortOrder'] = $this->getVarFiltersListing('string', 'mailboxes_ordering_sort_order', 'desc');
69 + $data['ordering'] = $this->getVarFiltersListing('cmd', 'mailboxes_ordering', 'id');
70 + $data['orderingSortOrder'] = $this->getVarFiltersListing('cmd', 'mailboxes_ordering_sort_order', 'desc');
71 71 }
72 72 }