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/Actions/VisitorDetails.php9
-rw-r--r--plugins/Live/tests/System/expected/test___Live.getVisitorProfile.xml20
-rw-r--r--plugins/Live/tests/System/expected/test_higherLimit__Live.getVisitorProfile.xml20
-rw-r--r--tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getVisitorProfile.xml5
-rw-r--r--tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getVisitorProfile.xml5
5 files changed, 48 insertions, 11 deletions
diff --git a/plugins/Actions/VisitorDetails.php b/plugins/Actions/VisitorDetails.php
index becb6cdaf7..1781593451 100644
--- a/plugins/Actions/VisitorDetails.php
+++ b/plugins/Actions/VisitorDetails.php
@@ -265,7 +265,14 @@ class VisitorDetails extends VisitorDetailsAbstract
public function finalizeProfile($visits, &$profile)
{
arsort($this->visitedPageUrls);
- $profile['visitedPages'] = $this->visitedPageUrls;
+ $profile['visitedPages'] = [];
+
+ foreach ($this->visitedPageUrls as $visitedPageUrl => $count) {
+ $profile['visitedPages'][] = [
+ 'url' => $visitedPageUrl,
+ 'count' => $count
+ ];
+ }
$this->handleSiteSearches($profile);
$this->handleAveragePageGenerationTime($profile);
diff --git a/plugins/Live/tests/System/expected/test___Live.getVisitorProfile.xml b/plugins/Live/tests/System/expected/test___Live.getVisitorProfile.xml
index 94b05f931a..878232f0c4 100644
--- a/plugins/Live/tests/System/expected/test___Live.getVisitorProfile.xml
+++ b/plugins/Live/tests/System/expected/test___Live.getVisitorProfile.xml
@@ -1192,10 +1192,22 @@
</lastVisit>
<visitsAggregated>10</visitsAggregated>
<visitedPages>
- <row key="http://example.org/my/dir/page0">8</row>
- <row key="http://example.org/my/dir/page1">8</row>
- <row key="http://example.org/my/dir/page2">8</row>
- <row key="http://example.org/my/dir/page3">7</row>
+ <row>
+ <url>http://example.org/my/dir/page0</url>
+ <count>8</count>
+ </row>
+ <row>
+ <url>http://example.org/my/dir/page1</url>
+ <count>8</count>
+ </row>
+ <row>
+ <url>http://example.org/my/dir/page2</url>
+ <count>8</count>
+ </row>
+ <row>
+ <url>http://example.org/my/dir/page3</url>
+ <count>7</count>
+ </row>
</visitedPages>
<devices>
<Unknown>
diff --git a/plugins/Live/tests/System/expected/test_higherLimit__Live.getVisitorProfile.xml b/plugins/Live/tests/System/expected/test_higherLimit__Live.getVisitorProfile.xml
index 481470e978..4071574fdc 100644
--- a/plugins/Live/tests/System/expected/test_higherLimit__Live.getVisitorProfile.xml
+++ b/plugins/Live/tests/System/expected/test_higherLimit__Live.getVisitorProfile.xml
@@ -2342,10 +2342,22 @@
</lastVisit>
<visitsAggregated>20</visitsAggregated>
<visitedPages>
- <row key="http://example.org/my/dir/page0">8</row>
- <row key="http://example.org/my/dir/page1">8</row>
- <row key="http://example.org/my/dir/page2">8</row>
- <row key="http://example.org/my/dir/page3">7</row>
+ <row>
+ <url>http://example.org/my/dir/page0</url>
+ <count>8</count>
+ </row>
+ <row>
+ <url>http://example.org/my/dir/page1</url>
+ <count>8</count>
+ </row>
+ <row>
+ <url>http://example.org/my/dir/page2</url>
+ <count>8</count>
+ </row>
+ <row>
+ <url>http://example.org/my/dir/page3</url>
+ <count>7</count>
+ </row>
</visitedPages>
<devices>
<Unknown>
diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getVisitorProfile.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getVisitorProfile.xml
index 6f59d16f8f..7d19d39bce 100644
--- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getVisitorProfile.xml
+++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getVisitorProfile.xml
@@ -303,7 +303,10 @@
</lastVisit>
<visitsAggregated>2</visitsAggregated>
<visitedPages>
- <row key="http://example.org/homepage">1</row>
+ <row>
+ <url>http://example.org/homepage</url>
+ <count>1</count>
+ </row>
</visitedPages>
<devices>
<Desktop>
diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getVisitorProfile.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getVisitorProfile.xml
index 6f59d16f8f..7d19d39bce 100644
--- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getVisitorProfile.xml
+++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getVisitorProfile.xml
@@ -303,7 +303,10 @@
</lastVisit>
<visitsAggregated>2</visitsAggregated>
<visitedPages>
- <row key="http://example.org/homepage">1</row>
+ <row>
+ <url>http://example.org/homepage</url>
+ <count>1</count>
+ </row>
</visitedPages>
<devices>
<Desktop>