diff options
author | Justin Velluppillai <justin@innocraft.com> | 2021-12-16 06:31:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 06:31:55 +0300 |
commit | 8f8511c9cf77c96458249e8b867f0ebe93b79ef9 (patch) | |
tree | 64fb9041bfa1434f2e926db1d28956e36016aede /plugins/CoreUpdater | |
parent | b85c6f06de79399924f065c798df88a179752790 (diff) |
Merge 4.6.x patches back to main branch (#18508)
* Fix for misaligned evolution trend icons (#18323)
* Aligned evolution trend icons, text tweak
* Update plugins/MultiSites/angularjs/dashboard/dashboard.directive.less
Co-authored-by: Stefan Giehl <stefan@matomo.org>
* Hide feedback banner in zen mode (#18329)
* [Vue] 4.6.0 fixes (#18334)
* feedback plugin may not be loaded
* fix copy paste
* async/await not supported
* built UMDs
* [Vue] use jQuery click for expand on click (#18341)
* use jQuery click for expand on click
* undo submodule change
* 4.6.0-rc2
* [Vue] fix modal notification placement (#18377)
* Use separate div in modals to display notifications otherwise Vue will erase modal content when initializing NotificationGroup component.
* built vue files
* Updating version to 4.6.0
* [Vue] date picker viewDate property is not kept up to date (#18385)
* viewDate ref is not kept up to date
* rebuild corehome
* 4.6.1-rc1
* 4.6.1
* [Vue] emit/broadcast on scope the method was called on not rootScope (#18419)
* emit/broadcast on correct scope in wrapper
* rebuild vue
* remove plugin.json from CoreVue, it is not needed and causes some UI tests to fail (#18421)
* Ensure UTF8mb4 conversion command always enables tracking again (#18444)
* Ensure UTF8mb4 conversion command always enables tracking again
* apply review feedback
* small code improvement
* Ignore segment errors in update script (#18455)
* 4.6.2-rc1
* Ensure update to 4.6.2 removes some files (#18473)
* 4.6.2 release!
* built vue files
Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: dizzy <diosmosis@users.noreply.github.com>
Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com>
Co-authored-by: justinvelluppillai <justinvelluppillai@users.noreply.github.com>
Diffstat (limited to 'plugins/CoreUpdater')
-rw-r--r-- | plugins/CoreUpdater/Commands/ConvertToUtf8mb4.php | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/plugins/CoreUpdater/Commands/ConvertToUtf8mb4.php b/plugins/CoreUpdater/Commands/ConvertToUtf8mb4.php index 141b71470c..6de015cd54 100644 --- a/plugins/CoreUpdater/Commands/ConvertToUtf8mb4.php +++ b/plugins/CoreUpdater/Commands/ConvertToUtf8mb4.php @@ -77,32 +77,33 @@ class ConvertToUtf8mb4 extends ConsoleCommand if ($yes) { + $config = Config::getInstance(); + if (!$keepTracking) { $output->writeln("\n" . Piwik::translate('Disabling Matomo Tracking')); - $config = Config::getInstance(); $config->Tracker['record_statistics'] = '0'; $config->forceSave(); } $output->writeln("\n" . Piwik::translate('CoreUpdater_ConsoleStartingDbUpgrade')); - foreach ($queries as $query) { - $output->write("\n" . 'Executing ' . $query . '... '); - Db::get()->exec($query); - $output->write(' done.'); - } - - $output->writeln("\n" . 'Updating used database charset in config.ini.php.'); - $config = Config::getInstance(); - $config->database['charset'] = 'utf8mb4'; - - if (!$keepTracking) { - $output->writeln("\n" . Piwik::translate('Enabling Matomo Tracking')); - $config->Tracker['record_statistics'] = '1'; + try { + foreach ($queries as $query) { + $output->write("\n" . 'Executing ' . $query . '... '); + Db::get()->exec($query); + $output->write(' done.'); + } + + $output->writeln("\n" . 'Updating used database charset in config.ini.php.'); + $config->database['charset'] = 'utf8mb4'; + } finally { + if (!$keepTracking) { + $output->writeln("\n" . Piwik::translate('Enabling Matomo Tracking')); + $config->Tracker['record_statistics'] = '1'; + } + $config->forceSave(); } - $config->forceSave(); - $this->writeSuccessMessage($output, array('Conversion to utf8mb4 successful.')); } else { |