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:
Diffstat (limited to 'core/CronArchive/ArchiveFilter.php')
-rw-r--r--core/CronArchive/ArchiveFilter.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/CronArchive/ArchiveFilter.php b/core/CronArchive/ArchiveFilter.php
index 7789ed556b..c3686aaa59 100644
--- a/core/CronArchive/ArchiveFilter.php
+++ b/core/CronArchive/ArchiveFilter.php
@@ -53,6 +53,13 @@ class ArchiveFilter
*/
private $skipSegmentsForToday = false;
+ /**
+ * If enabled, the only invalidations that will be processed are for the specific plugin and report specified
+ * here. Must be in the format "MyPlugin.myReport".
+ * @var string|null
+ */
+ private $forceReport = null;
+
public function __construct()
{
$this->setRestrictToPeriods('');
@@ -102,6 +109,14 @@ class ArchiveFilter
return "period is not specified in --force-periods";
}
+ if (!empty($this->forceReport)
+ && (empty($archive['plugin'])
+ || empty($archive['report'])
+ || $archive['plugin'] . '.' . $archive['report'] != $this->forceReport)
+ ) {
+ return "report is not the same as value specified in --force-report";
+ }
+
return false;
}
@@ -224,6 +239,11 @@ class ArchiveFilter
return $this->skipSegmentsForToday;
}
+ public function setForceReport($forceReport)
+ {
+ $this->forceReport = $forceReport;
+ }
+
/**
* @return array
*/