| @@ -16,11 +16,9 @@ | ||
| 16 | 16 | $socialIcons = json_decode($config->get('social_icons', '{}'), true); |
| 17 | 17 | if (empty($socialIcons['telegram'])) { |
| 18 | 18 | $socialIcons['telegram'] = ACYM_IMAGES.'logo/telegram.png'; |
| 19 | 19 | |
| 20 | - $newConfig = new \stdClass(); | |
| 21 | - $newConfig->social_icons = json_encode($socialIcons); | |
| 22 | - $config->save($newConfig); | |
| 20 | + $config->saveConfig(['social_icons' => json_encode($socialIcons)]); | |
| 23 | 21 | } |
| 24 | 22 | |
| 25 | 23 | $this->updateQuery('ALTER TABLE #__acym_mail_stat ADD COLUMN `click_unique` INT NOT NULL DEFAULT 0'); |
| 26 | 24 | $this->updateQuery('ALTER TABLE #__acym_mail_stat ADD COLUMN `click_total` INT NOT NULL DEFAULT 0'); |
| @@ -62,14 +60,15 @@ | ||
| 62 | 60 | if ($this->isPreviousVersionAtLeast('9.4.0')) { |
| 63 | 61 | return; |
| 64 | 62 | } |
| 65 | 63 | |
| 66 | - $config->save([ | |
| 64 | + $config->saveConfig([ | |
| 67 | 65 | 'from_email' => acym_strtolower($config->get('from_email')), |
| 68 | 66 | 'replyto_email' => acym_strtolower($config->get('replyto_email')), |
| 69 | 67 | 'bounce_email' => acym_strtolower($config->get('bounce_email')), |
| 70 | 68 | ]); |
| 71 | 69 | |
| 70 | + // Make sure that all domains in AcyMailer configuration are in lower cases | |
| 72 | 71 | $acymailerParams = $config->get('acymailer_domains', '[]'); |
| 73 | 72 | $acymailerParams = @json_decode($acymailerParams, true); |
| 74 | 73 | if (!empty($acymailerParams)) { |
| 75 | 74 | foreach ($acymailerParams as $domain => $domainParams) { |
| @@ -80,9 +79,9 @@ | ||
| 80 | 79 | |
| 81 | 80 | $acymailerParams[acym_strtolower($domain)] = $acymailerParams[$domain]; |
| 82 | 81 | unset($acymailerParams[$domain]); |
| 83 | 82 | } |
| 84 | - $config->save(['acymailer_domains' => json_encode($acymailerParams)]); | |
| 83 | + $config->saveConfig(['acymailer_domains' => json_encode($acymailerParams)]); | |
| 85 | 84 | } |
| 86 | 85 | |
| 87 | 86 | $this->updateQuery('ALTER TABLE `#__acym_field` DROP COLUMN `access`'); |
| 88 | 87 | } |
| @@ -142,8 +141,9 @@ | ||
| 142 | 141 | if ($this->isPreviousVersionAtLeast('9.10.1')) { |
| 143 | 142 | return; |
| 144 | 143 | } |
| 145 | 144 | |
| 145 | + // On some servers, there is a limit of 767 bytes for the index length, which corresponds to VARCHAR(191) | |
| 146 | 146 | $this->updateQuery('ALTER TABLE #__acym_user DROP INDEX `email_UNIQUE`'); |
| 147 | 147 | $this->updateQuery('ALTER TABLE #__acym_configuration CHANGE `name` `name` VARCHAR(190) NOT NULL'); |
| 148 | 148 | |
| 149 | 149 | $this->updateQuery('ALTER TABLE #__acym_mail_archive CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci'); |