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:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-06-12 00:49:22 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-06-12 00:49:59 +0400
commit6f36ed421cbf52b348932219fa4dedea7d4ef7bc (patch)
tree4ec547cb27e8ac6d1472b9996c685ee8e4967b9a /plugins
parent00787213a334e1c83a13b4143fd90e78523e94c8 (diff)
Fix bug in SegmentEditor plugin, make sure getKnownSegmentsToArchiveAllSites adds segment definitions to output segment array and not whole stored segment data.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/SegmentEditor/SegmentEditor.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php
index 7c587c4a18..3ac66afb1e 100644
--- a/plugins/SegmentEditor/SegmentEditor.php
+++ b/plugins/SegmentEditor/SegmentEditor.php
@@ -45,9 +45,11 @@ class Piwik_SegmentEditor extends Piwik_Plugin
public function getKnownSegmentsToArchiveAllSites($notification)
{
$segments =& $notification->getNotificationObject();
- $segmentToAutoArchive = Piwik_SegmentEditor_API::getInstance()->getAll($idSite = false, $returnAutoArchived = true);
- if (!empty($segmentToAutoArchive)) {
- $segments = array_merge($segments, $segmentToAutoArchive);
+ $segmentsToAutoArchive = Piwik_SegmentEditor_API::getInstance()->getAll(
+ $idSite = false, $returnAutoArchived = true);
+
+ foreach ($segmentsToAutoArchive as $segment) {
+ $segments[] = $segment['definition'];
}
}