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/VisitorInterest
parent5aacb1ea5a3954909cea62b797905cccf61a9edf (diff)
factoring out the shouldArchive logic
Diffstat (limited to 'plugins/VisitorInterest')
-rw-r--r--plugins/VisitorInterest/VisitorInterest.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php
index b3f948d93e..583e8c31da 100644
--- a/plugins/VisitorInterest/VisitorInterest.php
+++ b/plugins/VisitorInterest/VisitorInterest.php
@@ -126,19 +126,21 @@ class Piwik_VisitorInterest extends Piwik_Plugin
function archivePeriod($notification)
{
$archiveProcessing = $notification->getNotificationObject();
- if (!$archiveProcessing->shouldProcessReportsForPlugin($this->getPluginName())) return;
$archiving = new Piwik_VisitorInterest_Archiver($archiveProcessing);
- $archiving->archivePeriod();
+ if($archiving->shouldArchive()) {
+ $archiving->archivePeriod();
+ }
}
public function archiveDay($notification)
{
$archiveProcessing = $notification->getNotificationObject();
- if (!$archiveProcessing->shouldProcessReportsForPlugin($this->getPluginName())) return;
$archiving = new Piwik_VisitorInterest_Archiver($archiveProcessing);
- $archiving->archiveDay();
+ if($archiving->shouldArchive()) {
+ $archiving->archiveDay();
+ }
}