diff options
-rw-r--r-- | plugins/CoreAdminHome/Emails/JsTrackingCodeMissingEmail.php | 4 | ||||
-rw-r--r-- | plugins/CoreAdminHome/Tasks.php | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/plugins/CoreAdminHome/Emails/JsTrackingCodeMissingEmail.php b/plugins/CoreAdminHome/Emails/JsTrackingCodeMissingEmail.php index 5dde04403c..c48453e1ee 100644 --- a/plugins/CoreAdminHome/Emails/JsTrackingCodeMissingEmail.php +++ b/plugins/CoreAdminHome/Emails/JsTrackingCodeMissingEmail.php @@ -77,12 +77,12 @@ class JsTrackingCodeMissingEmail extends Mail $this->setWrappedHtmlBody($this->getDefaultBodyView()); } - private function getDefaultSubject() + protected function getDefaultSubject() { return Piwik::translate('CoreAdminHome_MissingTrackingCodeEmailSubject', ["'" . Site::getNameFor($this->idSite) . "'"]); } - private function getDefaultBodyView() + protected function getDefaultBodyView() { $view = new View('@CoreAdminHome/_jsTrackingCodeMissingEmail.twig'); $view->login = $this->login; diff --git a/plugins/CoreAdminHome/Tasks.php b/plugins/CoreAdminHome/Tasks.php index 719aa6b40d..0d051f5b6c 100644 --- a/plugins/CoreAdminHome/Tasks.php +++ b/plugins/CoreAdminHome/Tasks.php @@ -12,6 +12,7 @@ use Piwik\API\Request; use Piwik\ArchiveProcessor\Rules; use Piwik\Archive\ArchivePurger; use Piwik\Config; +use Piwik\Container\StaticContainer; use Piwik\DataAccess\ArchiveTableCreator; use Piwik\Date; use Piwik\Db; @@ -114,7 +115,12 @@ class Tasks extends \Piwik\Plugin\Tasks return; } - $email = new JsTrackingCodeMissingEmail($user['login'], $user['email'], $idSite); + $container = StaticContainer::getContainer(); + $email = $container->make(JsTrackingCodeMissingEmail::class, array( + 'login' => $user['login'], + 'emailAddress' => $user['email'], + 'idSite' => $idSite + )); $email->send(); } |