diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-05-20 14:39:47 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-05-20 14:39:47 +0300 |
commit | ba06f0aa8ccc4e15f2bc877c6f30ef4ac09627ab (patch) | |
tree | 766500e154200f754d0a7670edbeec8ca9d49796 /plugins | |
parent | fa3cce28fcd89c527bdfc01eaba1bf2a6d4873a3 (diff) |
Make sure to group the label in Referrer Websites report (#13884)
* Make sure to group the label in Referrer Websites report
I just debugged and can confirm behaviour described in #13882
The label includes a URL like `http://demo.matomo.org/foo/bar` and the label is then removed in the `ColumnCallbackReplace` filter meaning there could be several entries with the same label and a group by is needed.
* make sure to apply filter before paging
* Add test + slight optimization.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Referrers/DataTable/Filter/UrlsFromWebsiteId.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/Referrers/DataTable/Filter/UrlsFromWebsiteId.php b/plugins/Referrers/DataTable/Filter/UrlsFromWebsiteId.php index 56ae1ac792..0a013e031b 100644 --- a/plugins/Referrers/DataTable/Filter/UrlsFromWebsiteId.php +++ b/plugins/Referrers/DataTable/Filter/UrlsFromWebsiteId.php @@ -35,8 +35,7 @@ class UrlsFromWebsiteId extends BaseFilter $table->filter('ColumnCallbackAddMetadata', array('label', 'url', function ($label) { return htmlspecialchars_decode($label); })); - $table->filter('ColumnCallbackReplace', array('label', 'Piwik\Plugins\Referrers\getPathFromUrl')); - $table->filter('GroupBy', array('label')); + $table->filter('GroupBy', array('label', 'Piwik\Plugins\Referrers\getPathFromUrl')); foreach ($table->getRowsWithoutSummaryRow() as $row) { $subtable = $row->getSubtable(); @@ -45,4 +44,4 @@ class UrlsFromWebsiteId extends BaseFilter } } } -}
\ No newline at end of file +} |