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:
-rw-r--r--plugins/SegmentEditor/API.php6
-rw-r--r--plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php2
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/SegmentEditor/API.php b/plugins/SegmentEditor/API.php
index 2a732a995b..68a0a87db8 100644
--- a/plugins/SegmentEditor/API.php
+++ b/plugins/SegmentEditor/API.php
@@ -280,7 +280,8 @@ class API extends \Piwik\Plugin\API
$segmentDefinitionChanged = $segment['definition'] !== $definition;
if ($segmentDefinitionChanged && $autoArchive && !Rules::isBrowserTriggerEnabled()) {
- $this->segmentArchiving->reArchiveSegment($bind);
+ $updatedSegment = $this->getModel()->getSegment($idSegment);
+ $this->segmentArchiving->reArchiveSegment($updatedSegment);
}
Cache::getEagerCache()->flushAll();
@@ -327,7 +328,8 @@ class API extends \Piwik\Plugin\API
&& !Rules::isBrowserTriggerEnabled()
&& $this->processNewSegmentsFrom != SegmentArchiving::CREATION_TIME
) {
- $this->segmentArchiving->reArchiveSegment($bind);
+ $addedSegment = $this->getModel()->getSegment($id);
+ $this->segmentArchiving->reArchiveSegment($addedSegment);
}
return $id;
diff --git a/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php b/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
index 09430ca9be..a8a2c5208d 100644
--- a/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
+++ b/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
@@ -165,7 +165,7 @@ class SegmentEditorTest extends IntegrationTestCase
);
$this->assertReArchivesQueued([
- ['idSites' => [1], 'pluginName' => null, 'report' => null, 'segment' => $updatedSegment['definition'], 'startDate' => null],
+ ['idSites' => [1], 'pluginName' => null, 'report' => null, 'segment' => $updatedSegment['definition'], 'startDate' => Date::factory('2013-01-01 00:00:00')->getTimestamp()],
]);
$newSegment = API::getInstance()->get($idSegment2);