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:
authormattab <matthieu.aubry@gmail.com>2013-06-06 07:52:35 +0400
committermattab <matthieu.aubry@gmail.com>2013-06-06 07:52:35 +0400
commit83a116879ff29b784721ee1109cbc2c358ed1ec2 (patch)
tree5291d9db6fd1df3a01c6cda3b5c753827b54d972 /plugins/CustomVariables
parent5aacb1ea5a3954909cea62b797905cccf61a9edf (diff)
factoring out the shouldArchive logic
Diffstat (limited to 'plugins/CustomVariables')
-rw-r--r--plugins/CustomVariables/CustomVariables.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/plugins/CustomVariables/CustomVariables.php b/plugins/CustomVariables/CustomVariables.php
index 313632e411..d0c0b9d759 100644
--- a/plugins/CustomVariables/CustomVariables.php
+++ b/plugins/CustomVariables/CustomVariables.php
@@ -148,15 +148,12 @@ class Piwik_CustomVariables extends Piwik_Plugin
*/
public function archiveDay($notification)
{
- /** @var Piwik_ArchiveProcessing_Day $archiveProcessing */
$archiveProcessing = $notification->getNotificationObject();
- if (!$archiveProcessing->shouldProcessReportsForPlugin($this->getPluginName())) {
- return;
- }
-
$archiving = new Piwik_CustomVariables_Archiver($archiveProcessing);
- $archiving->archiveDay();
+ if($archiving->shouldArchive()) {
+ $archiving->archiveDay();
+ }
}
/**
@@ -165,13 +162,10 @@ class Piwik_CustomVariables extends Piwik_Plugin
function archivePeriod($notification)
{
$archiveProcessing = $notification->getNotificationObject();
-
- if (!$archiveProcessing->shouldProcessReportsForPlugin($this->getPluginName())) {
- return;
- }
-
$archiving = new Piwik_CustomVariables_Archiver($archiveProcessing);
- $archiving->archivePeriod();
+ if($archiving->shouldArchive()) {
+ $archiving->archivePeriod();
+ }
}
}