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:
authorThomas Steur <thomas.steur@gmail.com>2015-10-19 20:34:16 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-10-19 20:34:16 +0300
commit7bf1caf6115cac81ad66ba6d7cf30ecd4fc831f2 (patch)
tree73234b08d017f7f263109fcc3fb9c93b4dd717b6 /plugins/API
parent1b6050626d18e966cb18f03320ead7af14525db5 (diff)
fix remaining tests
Diffstat (limited to 'plugins/API')
-rw-r--r--plugins/API/API.php7
-rw-r--r--plugins/API/SegmentMetadata.php10
2 files changed, 6 insertions, 11 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php
index 5e046d41aa..8dcaf0186b 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -504,12 +504,7 @@ class API extends \Piwik\Plugin\API
if ($suggestedValuesCallbackRequiresTable) {
$values = call_user_func($segmentFound['suggestedValuesCallback'], $idSite, $maxSuggestionsToReturn, $table);
} else {
- // Cleanup data to return the top suggested (non empty) labels for this segment
- $values = $table->getColumn($segmentName);
-
- // Select also flattened keys (custom variables "page" scope, page URLs for one visit, page titles for one visit)
- $valuesBis = $table->getColumnsStartingWith($segmentName . ColumnDelete::APPEND_TO_COLUMN_NAME_TO_KEEP);
- $values = array_merge($values, $valuesBis);
+ $values = $this->getSegmentValuesFromVisitorLog($segmentName, $table);
}
$values = $this->getMostFrequentValues($values);
diff --git a/plugins/API/SegmentMetadata.php b/plugins/API/SegmentMetadata.php
index e8a7092311..caf89b7ea3 100644
--- a/plugins/API/SegmentMetadata.php
+++ b/plugins/API/SegmentMetadata.php
@@ -125,12 +125,12 @@ class SegmentMetadata
unset($segment['sqlFilter']);
unset($segment['sqlFilterValue']);
unset($segment['sqlSegment']);
- }
- if (isset($segment['suggestedValuesCallback'])
- && !is_string($segment['suggestedValuesCallback'])
- ) {
- unset($segment['suggestedValuesCallback']);
+ if (isset($segment['suggestedValuesCallback'])
+ && !is_string($segment['suggestedValuesCallback'])
+ ) {
+ unset($segment['suggestedValuesCallback']);
+ }
}
}