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 'plugins/ScheduledReports/API.php')
-rw-r--r--plugins/ScheduledReports/API.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ScheduledReports/API.php b/plugins/ScheduledReports/API.php
index 9e54c6baa6..c4ab3e20c0 100644
--- a/plugins/ScheduledReports/API.php
+++ b/plugins/ScheduledReports/API.php
@@ -15,6 +15,8 @@ use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\Date;
use Piwik\Db;
+use Piwik\Development;
+use Piwik\Filesystem;
use Piwik\Log;
use Piwik\NoAccessException;
use Piwik\Piwik;
@@ -609,10 +611,9 @@ class API extends \Piwik\Plugin\API
$now = Date::now()->getDatetime();
$this->getModel()->updateReport($report['idreport'], array('ts_last_sent' => $now));
- // If running from piwik.php with debug, do not delete the PDF after sending the email
- $tracker = new Tracker();
- if (!$tracker->isDebugModeEnabled()) {
+ if (!Development::isEnabled()) {
@chmod($outputFilename, 0600);
+ Filesystem::deleteFileIfExists($outputFilename);
}
}