From 34a2b51519ab7c4a81e2676a163d319ff1ff65fe Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Mon, 15 Apr 2019 08:12:35 +1200 Subject: [PATCH] fix #11 make sure to copy correct visits --- CHANGELOG.md | 3 +++ Migrations/LogMigration.php | 2 +- plugin.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 655505e..67f49d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +### 3.0.5 +- Fix an issue in copying visits + ### 3.0.4 - Fix possible duplicate entry error while migrating archives diff --git a/Migrations/LogMigration.php b/Migrations/LogMigration.php index a8790cb..8ade368 100644 --- a/Migrations/LogMigration.php +++ b/Migrations/LogMigration.php @@ -70,7 +70,7 @@ private function migrateVisits($visitRows, Request $request, LogActionMigration $visitorIdMap[$oldIdVisit] = $targetDb->insert('log_visit', $row); } - $visitorIds = array_map('intval', array_values($visitorIdMap)); + $visitorIds = array_map('intval', array_keys($visitorIdMap)); $visitorIds = implode(',', $visitorIds); $batchQuery = new BatchQuery(); diff --git a/plugin.json b/plugin.json index f39c12a..c34c0aa 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "Migration", "description": "Migrate/copy any measurable (site, app, roll-up) from one Matomo to another Matomo", - "version": "3.0.4", + "version": "3.0.5", "theme": false, "require": { "piwik": ">=3.7.0,<4.0.0-b1"