diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-07 23:38:31 +0400 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-07 23:38:31 +0400 |
commit | 51cf6ecc5542e463facb43f430cdc7c10f2aad98 (patch) | |
tree | 14decd30227c2b0aeb08c0b73f30731da192f5d3 /plugins | |
parent | 8308dc659bdd7eaa77b0963c4b8ecd3b7c5fe43d (diff) |
#5300 Log when trying to send the same report twice
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ScheduledReports/ScheduledReports.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/ScheduledReports/ScheduledReports.php b/plugins/ScheduledReports/ScheduledReports.php index e54ad8233f..eb66252ff1 100644 --- a/plugins/ScheduledReports/ScheduledReports.php +++ b/plugins/ScheduledReports/ScheduledReports.php @@ -10,6 +10,7 @@ namespace Piwik\Plugins\ScheduledReports; use Exception; use Piwik\Db; +use Piwik\Log; use Piwik\Mail; use Piwik\Option; use Piwik\Period; @@ -265,6 +266,11 @@ class ScheduledReports extends \Piwik\Plugin if (self::manageEvent($reportType)) { // Safeguard against sending the same report twice to the same email (unless $force is true) if (!$force && $this->reportAlreadySent($report, $period)) { + Log::warning(sprintf( + 'Preventing the same scheduled report from being sent again (report #%s for period "%s")', + $report['idreport'], + $prettyDate + )); return; } |