diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-01-04 09:34:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 09:34:37 +0300 |
commit | e92247972a99092eb300bcbc163492542017d1b5 (patch) | |
tree | 96396004aab1e2e7010c31388707a99b66d78a90 /plugins/Marketplace/UpdateCommunication.php | |
parent | 8e499448926af8870aa6f011128ba4031e4cfcb8 (diff) |
Make sure all Matomo emails use correct branding. (#13908)
* Make sure all Matomo emails use correct branding.
* update email logo
* reuse variables
* Change default from to Matomo Analytics.
* Fix list style in report emails, update customalerts submodule and make dashboard link got to default erport in emails.
* Updated submodule.
* Bump version + update submodules.
* Remove submodule update so plugins can be merged after rc2 merged.
Diffstat (limited to 'plugins/Marketplace/UpdateCommunication.php')
-rw-r--r-- | plugins/Marketplace/UpdateCommunication.php | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/plugins/Marketplace/UpdateCommunication.php b/plugins/Marketplace/UpdateCommunication.php index e0562af258..14eea704b5 100644 --- a/plugins/Marketplace/UpdateCommunication.php +++ b/plugins/Marketplace/UpdateCommunication.php @@ -16,6 +16,7 @@ use Piwik\Piwik; use Piwik\Plugins\CoreUpdater\SystemSettings; use Piwik\Plugins\UsersManager\API as UsersManagerApi; use Piwik\SettingsPiwik; +use Piwik\View; /** * Class to check and notify users via email if there are plugin updates available. @@ -125,7 +126,7 @@ class UpdateCommunication $mail->setDefaultFromPiwik(); $mail->addTo($superUser['email']); $mail->setSubject($subject); - $mail->setBodyText($message); + $mail->setWrappedHtmlBody($message); $mail->send(); } } @@ -176,36 +177,11 @@ class UpdateCommunication protected function buildNotificationMessage($pluginsToBeNotified, $hasThemeUpdate, $hasPluginUpdate) { - $message = Piwik::translate('ScheduledReports_EmailHello'); - $message .= "\n\n"; - $message .= Piwik::translate('CoreUpdater_ThereIsNewPluginVersionAvailableForUpdate'); - $message .= "\n\n"; - - foreach ($pluginsToBeNotified as $plugin) { - $message .= sprintf(' * %s %s', $plugin['name'], $plugin['latestVersion']); - $message .= "\n"; - } - - $message .= "\n"; - - $host = SettingsPiwik::getPiwikUrl(); - - if ($hasThemeUpdate) { - $message .= Piwik::translate('CoreUpdater_NotificationClickToUpdateThemes') . "\n"; - $message .= $host . 'index.php?module=CorePluginsAdmin&action=themes'; - } - - if ($hasPluginUpdate) { - if ($hasThemeUpdate) { - $message .= "\n\n"; - } - $message .= Piwik::translate('CoreUpdater_NotificationClickToUpdatePlugins') . "\n"; - $message .= $host . 'index.php?module=CorePluginsAdmin&action=plugins'; - } - - $message .= "\n\n"; - $message .= Piwik::translate('Installation_HappyAnalysing'); - - return $message; + $view = new View('@Marketplace/_updateCommunicationEmail.twig'); + $view->pluginsToBeNotified = $pluginsToBeNotified; + $view->host = SettingsPiwik::getPiwikUrl(); + $view->hasThemeUpdate = $hasThemeUpdate; + $view->hasPluginUpdate = $hasPluginUpdate; + return $view; } } |