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:
-rw-r--r--core/Metrics.php3
-rw-r--r--plugins/UserSettings/UserSettings.php2
-rw-r--r--plugins/VisitorInterest/API.php3
-rw-r--r--tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml2
4 files changed, 4 insertions, 6 deletions
diff --git a/core/Metrics.php b/core/Metrics.php
index 52fb59ddd0..bd480c1578 100644
--- a/core/Metrics.php
+++ b/core/Metrics.php
@@ -288,10 +288,9 @@ class Piwik_Metrics
return array_map('Piwik_Translate', $documentation);
}
-
public static function getPercentVisitColumn()
{
- $percentVisitsLabel = str_replace(' ', ' ' /* non breaking space */, Piwik_Translate('General_ColumnPercentageVisits'));
+ $percentVisitsLabel = str_replace(' ', html_entity_decode(' '), Piwik_Translate('General_ColumnPercentageVisits'));
return $percentVisitsLabel;
}
diff --git a/plugins/UserSettings/UserSettings.php b/plugins/UserSettings/UserSettings.php
index e1cd8c57c3..19b5252360 100644
--- a/plugins/UserSettings/UserSettings.php
+++ b/plugins/UserSettings/UserSettings.php
@@ -208,7 +208,7 @@ class Piwik_UserSettings extends Piwik_Plugin
if ($apiAction == 'getPlugin') {
$report['metrics'] = array(
'nb_visits',
- 'nb_visits_percentage' => Piwik_Metrics::getPercentVisitColumn()
+ 'nb_visits_percentage' => Piwik_Translate('General_ColumnPercentageVisits')
);
// There is no processedMetrics for this report
$report['processedMetrics'] = array();
diff --git a/plugins/VisitorInterest/API.php b/plugins/VisitorInterest/API.php
index deaec5a68e..b8abd9cb8c 100644
--- a/plugins/VisitorInterest/API.php
+++ b/plugins/VisitorInterest/API.php
@@ -117,8 +117,7 @@ class Piwik_VisitorInterest_API
}
} else {
$totalVisits = array_sum($dataTable->getColumn(Piwik_Metrics::INDEX_NB_VISITS));
- $dataTable->queueFilter('ColumnCallbackAddColumnPercentage', array(
- 'nb_visits_percentage', 'nb_visits', $totalVisits));
+ $dataTable->queueFilter('ColumnCallbackAddColumnPercentage', array('nb_visits_percentage', 'nb_visits', $totalVisits));
}
}
}
diff --git a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml
index b6412f802b..c251e44aef 100644
--- a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml
@@ -1808,7 +1808,7 @@
<documentation>This report shows which browser plugins your visitors had enabled. This information might be important for choosing the right way to deliver your content.</documentation>
<metrics>
<nb_visits>Visits</nb_visits>
- <nb_visits_percentage>% Visits</nb_visits_percentage>
+ <nb_visits_percentage>% Visits</nb_visits_percentage>
</metrics>
<constantRowsCount>1</constantRowsCount>
<metricsDocumentation>