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:
Diffstat (limited to 'plugins/API/API.php')
-rw-r--r--plugins/API/API.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php
index 30fbfbcf93..f84c95f443 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -194,7 +194,7 @@ class API extends \Piwik\Plugin\API
$sites = (is_array($idSites) ? implode('.', $idSites) : (int) $idSites);
$cache = Cache::getTransientCache();
- $cacheKey = 'API.getSegmentsMetadata' . $sites . '_' . (int) $_hideImplementationData . '_' . (int) $isNotAnonymous;
+ $cacheKey = 'API.getSegmentsMetadata' . $sites . '_' . (int) $_hideImplementationData . '_' . (int) $isNotAnonymous . '_' . (int) $_showAllSegments;
$cacheKey = CacheId::pluginAware($cacheKey);
if ($cache->contains($cacheKey)) {
@@ -597,7 +597,7 @@ class API extends \Piwik\Plugin\API
if (!empty($segment['unionOfSegments'])) {
$values = array();
foreach ($segment['unionOfSegments'] as $unionSegmentName) {
- $unionSegment = $this->findSegment($unionSegmentName, $idSite);
+ $unionSegment = $this->findSegment($unionSegmentName, $idSite, $_showAllSegments = true);
try {
$result = $this->getSuggestedValuesForSegmentName($idSite, $unionSegment, $maxSuggestionsToReturn);
@@ -655,9 +655,9 @@ class API extends \Piwik\Plugin\API
return $pages;
}
- private function findSegment($segmentName, $idSite)
+ private function findSegment($segmentName, $idSite, $_showAllSegments = false)
{
- $segmentsMetadata = $this->getSegmentsMetadata($idSite, $_hideImplementationData = false);
+ $segmentsMetadata = $this->getSegmentsMetadata($idSite, $_hideImplementationData = false, $_showAllSegments);
$segmentFound = false;
foreach ($segmentsMetadata as $segmentMetadata) {