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--plugins/API/Glossary.php6
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_glossary.png2
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png4
4 files changed, 9 insertions, 7 deletions
diff --git a/plugins/API/Glossary.php b/plugins/API/Glossary.php
index 144fcd4389..d76dcfdaa2 100644
--- a/plugins/API/Glossary.php
+++ b/plugins/API/Glossary.php
@@ -119,9 +119,11 @@ class Glossary
);
}
}
-
+
usort($metrics, function ($a, $b) {
- return strcmp($a['name'], $b['name']);
+ $key = ($a['name'] === $b['name'] ? 'id' : 'name');
+
+ return strcmp($a[$key], $b[$key]);
});
return $metrics;
}
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml
index eb60447cfd..66482770da 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml
@@ -157,12 +157,12 @@
</row>
<row>
<name>Pageviews</name>
- <id>nb_pageviews</id>
+ <id>nb_hits</id>
<documentation>The number of times this page was visited.</documentation>
</row>
<row>
<name>Pageviews</name>
- <id>nb_hits</id>
+ <id>nb_pageviews</id>
<documentation>The number of times this page was visited.</documentation>
</row>
<row>
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png b/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png
index d30965f9f2..8bb8814af3 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:846673e9f2b974e37fe864cfe920f4f3ba1c9e0bc5373c3139f9d8c1d06e7c5a
+oid sha256:4f321b873633ff84532035123aa25ffb00d92f8c299ee21b3d75bc203bd72031
size 604651
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png b/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png
index d2a1cab7e8..ba5dc0f123 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:9cc7c93bff1c5e0f7b75ab352dc8de15d51ee83c711aa9c3f564938de45e75ce
-size 751559
+oid sha256:87a8e9807dfd8881aa63a79f61f20f0afd7bab18470bb01e3e87fbfff6957a35
+size 751553