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:
authorJacob Ransom <jacob@innocraft.com>2022-09-01 01:51:42 +0300
committerJacob Ransom <jacob@innocraft.com>2022-09-01 01:51:42 +0300
commit013e60a4a9771bd57731624a1026b7d2e7a04f01 (patch)
treeb032b2c4c4ecfb026eb78c5590349a2341ab70c9
parentfd0cd32c58726e77f908f2f19565b7c7f8096219 (diff)
Posting to new activity to track when a customer requests report invalidation.dev-2669-add-reports-invalidated-activity
-rw-r--r--plugins/CoreAdminHome/Commands/InvalidateReportData.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/CoreAdminHome/Commands/InvalidateReportData.php b/plugins/CoreAdminHome/Commands/InvalidateReportData.php
index 4b10f9e2c3..7fb55d02ff 100644
--- a/plugins/CoreAdminHome/Commands/InvalidateReportData.php
+++ b/plugins/CoreAdminHome/Commands/InvalidateReportData.php
@@ -106,6 +106,22 @@ class InvalidateReportData extends ConsoleCommand
}
$logger->info($message);
} else {
+ /**
+ * Trigger the activity that tracks when a customer requests invalidation.
+ * Having the post here results in multiple activity logs if there are multiple segments and/or
+ * periods, but all of the dates and other fields are pretty much in the right format.
+ */
+ Piwik::postEvent('InvalidateReports.invalidateReports', [[
+ 'idSites' => is_array($sites) ? implode(',', $sites) : $sites,
+ 'dates' => is_array($dates) ? implode(',', $dates) : $dates,
+ 'period' => $periodType,
+ 'segment' => $segment,
+ 'cascadeDown' => $cascade,
+ '_forceInvalidateNonexistant' => false,
+ 'plugin' => $plugin,
+ 'ignoreLogDeletionLimit' => $ignoreLogDeletionLimit
+ ]]);
+
$invalidationResult = $invalidator->markArchivesAsInvalidated($sites, $dates, $periodType, $segment, $cascade,
false, $plugin, $ignoreLogDeletionLimit);