diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-06-06 07:52:35 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-06-06 07:52:35 +0400 |
commit | 83a116879ff29b784721ee1109cbc2c358ed1ec2 (patch) | |
tree | 5291d9db6fd1df3a01c6cda3b5c753827b54d972 /plugins/VisitorInterest | |
parent | 5aacb1ea5a3954909cea62b797905cccf61a9edf (diff) |
factoring out the shouldArchive logic
Diffstat (limited to 'plugins/VisitorInterest')
-rw-r--r-- | plugins/VisitorInterest/VisitorInterest.php | 10 |
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(); + } } |