diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-04-14 18:25:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 18:25:45 +0300 |
commit | 34f331bfb5521b232f24b4b7aa08201f7ea55a50 (patch) | |
tree | 566056b9c425ac8349b1506ee7228fcfd3b0b7b6 /plugins/SegmentEditor | |
parent | ea561b54613897b26d04cd25aafda92b66843b4b (diff) |
Rearchive segment only when definition changed (#17458)
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r-- | plugins/SegmentEditor/API.php | 4 |
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); } |