PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 10.1.4
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v10.1.4
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
acymailing / back / Helpers / Update / SQLPatch.php

SQLPatch.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 10.1.4, at back/Helpers/Update/SQLPatch.php

119 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AcyMailing\Helpers\Update;
4
5 use AcyMailing\Controllers\ConfigurationController;
6
7 trait SQLPatch
8 {
9 public function updateSQL(): void
10 {
11 if (!$this->isUpdating) {
12 return;
13 }
14
15 $config = acym_config();
16
17 $this->updateFor603();
18 $this->updateFor610();
19 $this->updateFor612();
20 $this->updateFor613();
21 $this->updateFor614();
22 $this->updateFor615($config);
23 $this->updateFor616();
24 $this->updateFor617();
25 $this->updateFor622($config);
26 $this->updateFor640();
27 $this->updateFor650();
28 $this->updateFor660();
29 $this->updateFor670();
30 $this->updateFor692();
31 $this->updateFor6100();
32 $this->updateFor6102();
33 $this->updateFor6104();
34 $this->updateFor6110();
35 $this->updateFor6120();
36 $this->updateFor6130();
37 $this->updateFor6140();
38 $this->updateFor6150();
39 $this->updateFor6160();
40 $this->updateFor6170();
41 $this->updateFor6180();
42 $this->updateFor6181();
43 $this->updateFor6190();
44
45 $this->updateFor700($config);
46 $this->updateFor710();
47 $this->updateFor720($config);
48 $this->updateFor721();
49 $this->updateFor740($config);
50 $this->updateFor750($config);
51 $this->updateFor755();
52 $this->updateFor759();
53 $this->updateFor7510();
54 $this->updateFor760();
55 $this->updateFor761();
56 $this->updateFor762();
57 $this->updateFor776();
58 $this->updateFor781();
59 $this->updateFor792();
60 $this->updateFor793();
61 $this->updateFor794();
62 $this->updateFor796();
63
64 $this->updateFor800($config);
65 $this->updateFor810();
66 $this->updateFor811();
67 $this->updateFor850();
68 $this->updateFor860();
69 $this->updateFor862();
70 $this->updateFor870();
71 $this->updateFor872($config);
72 $this->updateFor873($config);
73 $this->updateFor874($config);
74 $this->updateFor881($config);
75
76 $this->updateFor920($config);
77 $this->updateFor930();
78 $this->updateFor931();
79 $this->updateFor940($config);
80 $this->updateFor961();
81 $this->updateFor970();
82 $this->updateFor980();
83 $this->updateFor990();
84 $this->updateFor9101();
85 $this->updateFor9102();
86 $this->updateFor9110();
87
88 $this->updateFor1000();
89 }
90
91 public function checkDB(): void
92 {
93 $configController = new ConfigurationController();
94 $messages = $configController->checkDB(false);
95
96 if (empty($messages)) {
97 return;
98 }
99
100 $isError = false;
101 $textMsgs = [];
102 foreach ($messages as $oneMsg) {
103 if ($oneMsg['error']) {
104 $isError = true;
105 }
106 $textMsgs[] = $oneMsg['msg'];
107 }
108
109 if ($isError && !empty($textMsgs)) {
110 acym_enqueueMessage(implode('<br />', $textMsgs), 'warning');
111 }
112 }
113
114 private function isPreviousVersionAtLeast(string $versionNumber): bool
115 {
116 return version_compare($this->previousVersion, $versionNumber, '>=');
117 }
118 }
119