Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Velluppillai <justin@innocraft.com>2021-12-16 06:31:55 +0300
committerGitHub <noreply@github.com>2021-12-16 06:31:55 +0300
commit8f8511c9cf77c96458249e8b867f0ebe93b79ef9 (patch)
tree64fb9041bfa1434f2e926db1d28956e36016aede
parentb85c6f06de79399924f065c798df88a179752790 (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>
-rw-r--r--core/Updates/4.6.0-b4.php6
-rw-r--r--core/Updates/4.6.2-rc2.php31
-rw-r--r--plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts1
-rw-r--r--plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts1
-rw-r--r--plugins/CoreUpdater/Commands/ConvertToUtf8mb4.php33
5 files changed, 54 insertions, 18 deletions
diff --git a/core/Updates/4.6.0-b4.php b/core/Updates/4.6.0-b4.php
index 72b2ce0c6a..3c517f997d 100644
--- a/core/Updates/4.6.0-b4.php
+++ b/core/Updates/4.6.0-b4.php
@@ -52,7 +52,11 @@ class Updates_4_6_0_b4 extends PiwikUpdates
$segmentStrings = Rules::getSegmentsToProcess([$idSite]);
foreach ($segmentStrings as $segmentString) {
- $segment = new Segment($segmentString, [$idSite]);
+ try {
+ $segment = new Segment($segmentString, [$idSite]);
+ } catch (\Exception $e) {
+ continue;
+ }
if ($segment->getOriginalString() === $segment->getString()) {
continue;
}
diff --git a/core/Updates/4.6.2-rc2.php b/core/Updates/4.6.2-rc2.php
new file mode 100644
index 0000000000..26aec321c3
--- /dev/null
+++ b/core/Updates/4.6.2-rc2.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+
+namespace Piwik\Updates;
+
+use Piwik\Filesystem;
+use Piwik\Updater;
+use Piwik\Updates as PiwikUpdates;
+
+/**
+ * Update for version 4.6.2-rc2.
+ */
+class Updates_4_6_2_rc2 extends PiwikUpdates
+{
+ /**
+ * @param Updater $updater
+ */
+ public function doUpdate(Updater $updater)
+ {
+ Filesystem::unlinkRecursive(PIWIK_INCLUDE_PATH . '/misc/composer', true);
+ @unlink(PIWIK_INCLUDE_PATH . '/node_modules/iframe-resizer/.eslintrc');
+ @unlink(PIWIK_INCLUDE_PATH . '/node_modules/jquery.dotdotdot/.npmignore');
+ @unlink(PIWIK_INCLUDE_PATH . '/node_modules/ng-dialog/.eslintrc');
+ }
+}
diff --git a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts
index ba00aa529e..50cfe5e2c5 100644
--- a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts
+++ b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts
@@ -94,7 +94,6 @@ export default {
const expander = DirectiveUtilities.getRef(binding.value.expander, binding);
expander.addEventListener('click', binding.value.onExpand);
});
-
doc.addEventListener('keyup', binding.value.onEscapeHandler);
doc.addEventListener('mousedown', binding.value.onMouseDown);
doc.addEventListener('mouseup', binding.value.onClickOutsideElement);
diff --git a/plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts b/plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts
index 9a6da109da..eb52affa09 100644
--- a/plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts
+++ b/plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts
@@ -19,6 +19,7 @@ function initPiwikService(piwik: PiwikGlobal, $rootScope: IRootScopeService) {
($rootScope as any).$oldEmit = $rootScope.$emit; // eslint-disable-line
$rootScope.$emit = function emitWrapper(name: string, ...args: any[]): IAngularEvent { // eslint-disable-line
Matomo.postEventNoEmit(name, ...args);
+
return (this as any).$oldEmit(name, ...args); // eslint-disable-line
};
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 {