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/Helpers/Update/Configuration.php +16 -24 10.0.1 → 11.1.0 View file →
@@ -1,8 +1,10 @@
1 1 <?php
2 2
3 3 namespace AcyMailing\Helpers\Update;
4 4
5 +use AcyMailing\Helpers\CronHelper;
6 +
5 7 trait Configuration
6 8 {
7 9 public function addPref(): bool
8 10 {
@@ -31,10 +33,8 @@
31 33
32 34 $allPref['add_names'] = '1';
33 35 $allPref['encoding_format'] = '8bit';
34 36 $allPref['charset'] = 'UTF-8';
35 - $allPref['word_wrapping'] = '150';
36 - $allPref['hostname'] = '';
37 37 $allPref['embed_images'] = '0';
38 38 $allPref['embed_files'] = '0';
39 39 $allPref['editor'] = 'codemirror';
40 40 $allPref['multiple_part'] = '1';
@@ -40,9 +40,8 @@
40 40 $allPref['multiple_part'] = '1';
41 41
42 42 $smtpinfos = explode(':', acym_getCMSConfig('smtphost', ''));
43 43 $allPref['smtp_host'] = $smtpinfos[0];
44 - $allPref['smtp_type'] = 'oauth';
45 44 if (isset($smtpinfos[1])) {
46 45 $allPref['smtp_port'] = $smtpinfos[1];
47 46 }
48 47 if (!in_array($allPref['smtp_secured'], ['tls', 'ssl'])) {
@@ -48,9 +47,10 @@
48 47 if (!in_array($allPref['smtp_secured'], ['tls', 'ssl'])) {
49 48 $allPref['smtp_secured'] = '';
50 49 }
51 50
52 - $allPref['social_icons'] = json_encode([
51 + $allPref['social_icons'] = json_encode(
52 + [
53 53 'facebook' => ACYM_IMAGES.'logo/facebook.png',
54 54 'twitter' => ACYM_IMAGES.'logo/twitter.png',
55 55 'x' => ACYM_IMAGES.'logo/x.png',
56 56 'instagram' => ACYM_IMAGES.'logo/instagram.png',
@@ -66,9 +66,9 @@
66 66 $allPref['queue_nbmail'] = '40';
67 67 $allPref['queue_nbmail_auto'] = '70';
68 68 $allPref['queue_type'] = 'auto';
69 69 $allPref['queue_try'] = '3';
70 - $allPref['queue_pause'] = '120';
70 + $allPref['queue_pause'] = '30';
71 71 $allPref['allow_visitor'] = '1';
72 72 $allPref['require_confirmation'] = '1';
73 73 $allPref['priority_newsletter'] = '3';
74 74 $allPref['allowed_files'] = 'zip,doc,docx,pdf,xls,txt,gzip,rar,jpg,jpeg,gif,xlsx,pps,csv,bmp,ico,odg,odp,ods,odt,png,ppt,swf,xcf,mp3,wma';
@@ -73,9 +73,8 @@
73 73 $allPref['priority_newsletter'] = '3';
74 74 $allPref['allowed_files'] = 'zip,doc,docx,pdf,xls,txt,gzip,rar,jpg,jpeg,gif,xlsx,pps,csv,bmp,ico,odg,odp,ods,odt,png,ppt,swf,xcf,mp3,wma';
75 75 $allPref['confirm_redirect'] = '';
76 76 $allPref['subscription_message'] = '1';
77 - $allPref['notification_unsuball'] = '';
78 77 $allPref['cron_next'] = '1251990901';
79 78 $allPref['confirmation_message'] = '1';
80 79 $allPref['welcome_message'] = '1';
81 80 $allPref['unsub_message'] = '1';
@@ -82,35 +81,27 @@
82 81 $allPref['cron_last'] = '0';
83 82 $allPref['cron_fromip'] = '';
84 83 $allPref['cron_report'] = '';
85 84 $allPref['cron_frequency'] = '900';
86 - $allPref['cron_sendreport'] = '2';
87 - $allPref['cron_fullreport'] = '1';
88 - $allPref['cron_savereport'] = '2';
85 + $allPref['cron_sendreport'] = CronHelper::SEND_REPORT_ONLY_ON_ERROR;
86 + $allPref['cron_savereport'] = CronHelper::SEND_REPORT_ONLY_ON_ACTION;
87 + $allPref['direct_queue_statistics'] = 0;
89 88 $allPref['uploadfolder'] = str_replace('\\', '/', ACYM_UPLOAD_FOLDER);
90 - $allPref['notification_created'] = '';
91 - $allPref['notification_accept'] = '';
92 - $allPref['notification_refuse'] = '';
93 - $allPref['forward'] = '0';
94 - $allPref['priority_followup'] = '2';
95 - $allPref['unsub_redirect'] = '';
96 - $allPref['use_sef'] = '0';
97 - $allPref['css_frontend'] = '';
98 - $allPref['css_backend'] = '';
99 89 $allPref['last_import'] = '';
100 - $allPref['unsub_reasons'] = serialize(['UNSUB_SURVEY_FREQUENT', 'UNSUB_SURVEY_RELEVANT']);
101 90 $allPref['security_key'] = acym_generateKey(30);
91 + $allPref['api_key'] = acym_generateKey(30);
92 + $allPref['cron_security'] = 1;
93 + $allPref['cron_key'] = acym_generateKey(30);
102 94 $allPref['export_excelsecurity'] = 1;
103 95 $allPref['gdpr_export'] = 0;
104 96 $allPref['gdpr_delete'] = 0;
105 - $allPref['anonymous_tracking'] = '0';
106 - $allPref['anonymizeold'] = '0';
97 + $allPref['dont_track_by_default'] = 0;
98 + $allPref['user_tracking_control'] = 0;
107 99 $allPref['trackingsystem'] = 'acymailing';
108 100 $allPref['trackingsystemexternalwebsite'] = 1;
109 101 $allPref['generate_name'] = 1;
110 102 $allPref['allow_modif'] = 'data';
111 103 $allPref['from_as_replyto'] = '1';
112 - $allPref['templates_installed'] = '0';
113 104 $allPref['bounceVersion'] = self::BOUNCE_VERSION;
114 105 $allPref['numberThumbnail'] = 2;
115 106 $allPref['daily_hour'] = '12';
116 107 $allPref['daily_minute'] = '00';
@@ -135,9 +126,9 @@
135 126
136 127 $allPref['Starter'] = ACYM_STARTER;
137 128 $allPref['Essential'] = ACYM_ESSENTIAL;
138 129 $allPref['Enterprise'] = ACYM_ENTERPRISE;
139 - $allPref['previous_version'] = '10.0.1';
130 + $allPref['previous_version'] = '11.1.0';
140 131
141 132 $allPref['display_built_by'] = acym_level(ACYM_ESSENTIAL) ? 0 : 1;
142 133 $allPref['php_overrides'] = 0;
143 134
@@ -158,9 +149,9 @@
158 149 $results = null;
159 150 }
160 151
161 152 if ($results === null) {
162 - acym_display(isset($e) ? $e->getMessage() : substr(strip_tags(acym_getDBError()), 0, 200).'...', 'error');
153 + acym_display(isset($e) ? $e->getMessage() : substr(acym_stripTags(acym_getDBError()), 0, 200).'...', 'error');
163 154
164 155 return false;
165 156 }
166 157
@@ -174,8 +165,9 @@
174 165
175 166 $this->isUpdating = true;
176 167 $this->previousVersion = $results['version']->value;
177 168
169 + //We update the version properly as it's a new one which is now used.
178 170 $query = 'REPLACE INTO `#__acym_configuration` (`name`,`value`) VALUES ("level",'.acym_escapeDB($this->level).')';
179 171 $query .= ',("version",'.acym_escapeDB($this->version).')';
180 172 $query .= ',("installcomplete","0")';
181 173 $query .= ',("previous_version",'.acym_escapeDB($this->previousVersion).')';