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:
authordiosmosis <diosmosis@users.noreply.github.com>2019-01-04 09:34:37 +0300
committerGitHub <noreply@github.com>2019-01-04 09:34:37 +0300
commite92247972a99092eb300bcbc163492542017d1b5 (patch)
tree96396004aab1e2e7010c31388707a99b66d78a90 /plugins/Marketplace
parent8e499448926af8870aa6f011128ba4031e4cfcb8 (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')
-rw-r--r--plugins/Marketplace/UpdateCommunication.php40
-rw-r--r--plugins/Marketplace/templates/_updateCommunicationEmail.twig26
2 files changed, 34 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;
}
}
diff --git a/plugins/Marketplace/templates/_updateCommunicationEmail.twig b/plugins/Marketplace/templates/_updateCommunicationEmail.twig
new file mode 100644
index 0000000000..5c24e472db
--- /dev/null
+++ b/plugins/Marketplace/templates/_updateCommunicationEmail.twig
@@ -0,0 +1,26 @@
+<p>{{ 'ScheduledReports_EmailHello'|translate }}</p>
+<p>{{ 'CoreUpdater_ThereIsNewPluginVersionAvailableForUpdate'|translate }}</p>
+
+<ul>
+{% for plugin in pluginsToBeNotified %}
+<li>{{ plugin.name }} {{ plugin.latestVersion }}</li>
+{% endfor %}
+</ul>
+
+{% if hasThemeUpdate %}
+<p>
+{{ 'CoreUpdater_NotificationClickToUpdateThemes'|translate }}<br/>
+{{ host }}index.php?module=CorePluginsAdmin&action=themes
+</p>
+{% endif %}
+
+{% if hasPluginUpdate %}
+<p>
+{{ 'CoreUpdater_NotificationClickToUpdatePlugins'|translate }}<br/>
+{{ host }}index.php?module=CorePluginsAdmin&action=plugins
+</p>
+{% endif %}
+
+<p>
+{{ 'Installation_HappyAnalysing'|translate }}
+</p>