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:
authorStefan Giehl <stefan@matomo.org>2021-04-14 18:25:45 +0300
committerGitHub <noreply@github.com>2021-04-14 18:25:45 +0300
commit34f331bfb5521b232f24b4b7aa08201f7ea55a50 (patch)
tree566056b9c425ac8349b1506ee7228fcfd3b0b7b6 /plugins/SegmentEditor
parentea561b54613897b26d04cd25aafda92b66843b4b (diff)
Rearchive segment only when definition changed (#17458)
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r--plugins/SegmentEditor/API.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/SegmentEditor/API.php b/plugins/SegmentEditor/API.php
index 99f6585039..65758b3c64 100644
--- a/plugins/SegmentEditor/API.php
+++ b/plugins/SegmentEditor/API.php
@@ -274,7 +274,9 @@ class API extends \Piwik\Plugin\API
$this->getModel()->updateSegment($idSegment, $bind);
- if ($autoArchive && !Rules::isBrowserTriggerEnabled()) {
+ $segmentDefinitionChanged = $segment['definition'] !== $definition;
+
+ if ($segmentDefinitionChanged && $autoArchive && !Rules::isBrowserTriggerEnabled()) {
$this->segmentArchiving->reArchiveSegment($bind);
}