diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-06-12 00:49:22 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-06-12 00:49:59 +0400 |
commit | 6f36ed421cbf52b348932219fa4dedea7d4ef7bc (patch) | |
tree | 4ec547cb27e8ac6d1472b9996c685ee8e4967b9a /plugins | |
parent | 00787213a334e1c83a13b4143fd90e78523e94c8 (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.php | 8 |
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']; } } |