diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-11-29 22:10:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 22:10:21 +0300 |
commit | 1d3388c1cd3dd03743576d670118a65e9cd879cb (patch) | |
tree | 9eaecc6e25c5b854e73701d4a8824fd9cde43d8c /plugins/Actions/API.php | |
parent | d4b86bb164d037f0a15e7d985a5f8072065b7eaa (diff) |
Do not specify a category delimiter by default (#13688)
* do not specify a category delimiter by default
* couple fixes
* more fixes
* fix more tests
* fix more testts
* Update LabelFilterTest.php
* Update ArchivingHelper.php
* fix test
Diffstat (limited to 'plugins/Actions/API.php')
-rw-r--r-- | plugins/Actions/API.php | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index bb4489e295..5f84aa3fd0 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -95,7 +95,7 @@ class API extends \Piwik\Plugin\API $dataTable = Archive::createDataTableFromArchive('Actions_actions_url', $idSite, $period, $date, $segment, $expanded, $flat, $idSubtable, $depth); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); if ($flat) { $dataTable->filter(function(DataTable $dataTable) { @@ -196,7 +196,7 @@ class API extends \Piwik\Plugin\API $callBackParameters = array('Actions_actions_url', $idSite, $period, $date, $segment, $expanded = false, $flat = false, $idSubtable = null); $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $pageUrl, Action::TYPE_PAGE_URL); $this->addPageProcessedMetrics($dataTable); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); return $dataTable; } @@ -206,7 +206,7 @@ class API extends \Piwik\Plugin\API $dataTable = Archive::createDataTableFromArchive('Actions_actions', $idSite, $period, $date, $segment, $expanded, $flat, $idSubtable); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = true); return $dataTable; } @@ -246,7 +246,7 @@ class API extends \Piwik\Plugin\API $callBackParameters = array('Actions_actions', $idSite, $period, $date, $segment, $expanded = false, $flat = false, $idSubtable = null); $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $pageName, Action::TYPE_PAGE_TITLE); $this->addPageProcessedMetrics($dataTable); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = true); return $dataTable; } @@ -255,7 +255,7 @@ class API extends \Piwik\Plugin\API Piwik::checkUserHasViewAccess($idSite); $dataTable = Archive::createDataTableFromArchive('Actions_downloads', $idSite, $period, $date, $segment, $expanded, $flat, $idSubtable); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); return $dataTable; } @@ -265,7 +265,7 @@ class API extends \Piwik\Plugin\API $callBackParameters = array('Actions_downloads', $idSite, $period, $date, $segment, $expanded = false, $flat = false, $idSubtable = null); $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $downloadUrl, Action::TYPE_DOWNLOAD); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); return $dataTable; } @@ -274,7 +274,7 @@ class API extends \Piwik\Plugin\API Piwik::checkUserHasViewAccess($idSite); $dataTable = Archive::createDataTableFromArchive('Actions_outlink', $idSite, $period, $date, $segment, $expanded, $flat, $idSubtable); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); return $dataTable; } @@ -284,7 +284,7 @@ class API extends \Piwik\Plugin\API $callBackParameters = array('Actions_outlink', $idSite, $period, $date, $segment, $expanded = false, $flat = false, $idSubtable = null); $dataTable = $this->getFilterPageDatatableSearch($callBackParameters, $outlinkUrl, Action::TYPE_OUTLINK); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); return $dataTable; } @@ -294,7 +294,7 @@ class API extends \Piwik\Plugin\API $dataTable = $this->getSiteSearchKeywordsRaw($idSite, $period, $date, $segment); $dataTable->deleteColumn(PiwikMetrics::INDEX_SITE_SEARCH_HAS_NO_RESULT); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); $dataTable->filter('ReplaceColumnNames'); $this->addPagesPerSearchColumn($dataTable); return $dataTable; @@ -332,7 +332,7 @@ class API extends \Piwik\Plugin\API )); $dataTable->deleteRow(DataTable::ID_SUMMARY_ROW); $dataTable->deleteColumn(PiwikMetrics::INDEX_SITE_SEARCH_HAS_NO_RESULT); - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); $dataTable->filter('ReplaceColumnNames'); $this->addPagesPerSearchColumn($dataTable); return $dataTable; @@ -383,7 +383,7 @@ class API extends \Piwik\Plugin\API $dataTable = APICustomVariables::getInstance()->getCustomVariablesValuesFromNameId($idSite, $period, $date, $idSubtable, $segment); } } - $this->filterActionsDataTable($dataTable); + $this->filterActionsDataTable($dataTable, $isPageTitleType = false); $dataTable->filter('ReplaceColumnNames'); $this->addPagesPerSearchColumn($dataTable, $columnToRead = 'nb_actions'); return $dataTable; @@ -498,13 +498,14 @@ class API extends \Piwik\Plugin\API * Common filters for all Actions API * * @param DataTable|DataTable\Simple|DataTable\Map $dataTable + * @param bool $isPageTitleType Whether we are handling page title or regular URL */ - private function filterActionsDataTable($dataTable) + private function filterActionsDataTable($dataTable, $isPageTitleType) { // Must be applied before Sort in this case, since the DataTable can contain both int and strings indexes // (in the transition period between pre 1.2 and post 1.2 datatable structure) - $dataTable->filter('Piwik\Plugins\Actions\DataTable\Filter\Actions'); + $dataTable->filter('Piwik\Plugins\Actions\DataTable\Filter\Actions', array($isPageTitleType)); return $dataTable; } |