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:
authordiosmosis <diosmosis@users.noreply.github.com>2019-08-07 00:16:13 +0300
committerGitHub <noreply@github.com>2019-08-07 00:16:13 +0300
commit8bc18861652ddcd64f8022318f0b8201ac7e9ba4 (patch)
tree73e65f15b3467cf8a3bd048bfba432c356ed85ba /plugins/Actions/ArchivingHelper.php
parentbe4540fd4c15118bf773683d6c7848b22af903a1 (diff)
Handle ranking query others row properly in contents & events archiver. (#14622)
* Add more types of actions to ManyVisitsWithMockLocationProvider fixture. * fix test change * update expected test files * Handle ranking query others row properly in contents & events archiver. * Use custom ranking query specific others label and handle by default in DataArray::asDatatable(). * Updating expected test files. * Use strict compare since label can be 0 apparently. * Update expecred test files.
Diffstat (limited to 'plugins/Actions/ArchivingHelper.php')
-rw-r--r--plugins/Actions/ArchivingHelper.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Actions/ArchivingHelper.php b/plugins/Actions/ArchivingHelper.php
index 2e878a45bb..e5c315d0b1 100644
--- a/plugins/Actions/ArchivingHelper.php
+++ b/plugins/Actions/ArchivingHelper.php
@@ -15,6 +15,7 @@ use Piwik\DataTable;
use Piwik\DataTable\Row;
use Piwik\Metrics as PiwikMetrics;
use Piwik\Piwik;
+use Piwik\RankingQuery;
use Piwik\Tracker\Action;
use Piwik\Tracker\PageUrl;
use Zend_Db_Statement;
@@ -57,7 +58,7 @@ class ArchivingHelper
continue;
}
- $hasRowName = !empty($row['name']) && $row['name'] != DataTable::LABEL_SUMMARY_ROW;
+ $hasRowName = !empty($row['name']) && $row['name'] != RankingQuery::LABEL_SUMMARY_ROW;
// This will appear as <url /> in the API, which is actually very important to keep
// eg. When there's at least one row in a report that does not have a URL, not having this <url/> would break HTML/PDF reports.
@@ -381,7 +382,7 @@ class ArchivingHelper
}
// check for ranking query cut-off
- if ($actionName == DataTable::LABEL_SUMMARY_ROW) {
+ if ($actionName == RankingQuery::LABEL_SUMMARY_ROW) {
$summaryRow = $currentTable->getRowFromId(DataTable::ID_SUMMARY_ROW);
if ($summaryRow === false) {
$summaryRow = $currentTable->addSummaryRow(self::createSummaryRow());
@@ -499,7 +500,7 @@ class ArchivingHelper
*/
private static function getCachedActionRowKey($idAction, $actionType)
{
- return $idAction == DataTable::LABEL_SUMMARY_ROW
+ return $idAction == RankingQuery::LABEL_SUMMARY_ROW
? $actionType . '_others'
: $idAction;
}