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/Plugin/Archiver.php')
-rw-r--r--core/Plugin/Archiver.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/Plugin/Archiver.php b/core/Plugin/Archiver.php
index 7cc9fe26f5..90e325bc8e 100644
--- a/core/Plugin/Archiver.php
+++ b/core/Plugin/Archiver.php
@@ -60,6 +60,11 @@ abstract class Archiver
private $processor;
/**
+ * @var bool
+ */
+ private $enabled;
+
+ /**
* Constructor.
*
* @param ArchiveProcessor $processor The ArchiveProcessor instance to use when persisting archive
@@ -69,6 +74,7 @@ abstract class Archiver
{
$this->maximumRows = PiwikConfig::getInstance()->General['datatable_archiving_maximum_rows_standard'];
$this->processor = $processor;
+ $this->enabled = true;
}
/**
@@ -121,6 +127,11 @@ abstract class Archiver
return $this->getProcessor()->getLogAggregator();
}
+ public function disable()
+ {
+ $this->enabled = false;
+ }
+
/**
* Whether this Archiver should be used or not.
*
@@ -128,6 +139,6 @@ abstract class Archiver
*/
public function isEnabled()
{
- return true;
+ return $this->enabled;
}
}