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:
authorStefan Giehl <stefan@matomo.org>2020-07-26 21:14:28 +0300
committerGitHub <noreply@github.com>2020-07-26 21:14:28 +0300
commit539faeac7f49fac5d63e78edeaef25ab40f4020f (patch)
tree4c40472c2ad7e90d00a4637642332e8edac144f9 /plugins/CustomDimensions
parente54406a24cc5a9452540814d26689f1702b95eda (diff)
sort custom dimensions alphabetically in menu (#16241)
Diffstat (limited to 'plugins/CustomDimensions')
-rw-r--r--plugins/CustomDimensions/CustomDimensions.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/CustomDimensions/CustomDimensions.php b/plugins/CustomDimensions/CustomDimensions.php
index 9a7d3df799..83b4ec9da1 100644
--- a/plugins/CustomDimensions/CustomDimensions.php
+++ b/plugins/CustomDimensions/CustomDimensions.php
@@ -168,6 +168,11 @@ class CustomDimensions extends Plugin
}
$dimensions = $this->getCustomDimensions($idSite);
+
+ usort($dimensions, function ($a, $b) {
+ return strcmp($a['name'], $b['name']);
+ });
+
$order = 70;
foreach ($dimensions as $dimension) {