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>2018-10-03 22:58:29 +0300
committerGitHub <noreply@github.com>2018-10-03 22:58:29 +0300
commite6de421f2cd189fbba3ac836dce5770bac66e1bc (patch)
treec32cab35dd3fe3617a1c1b9c6948463b4b59e38c /plugins/ScheduledReports
parent902bd940c87fd9f0d1730dc2b9560b862b8c8e9a (diff)
Use placeholder for unsubscribe link and place it near the normal email footer content. (#13421)
* Use placeholder for unsubscribe link and place it near the normal email footer content. * padding tweak for whitelabel * fix unsubscribe link escaping replace issue * Move _htmlReportFooter contents to _htmlEmailFooter.twig. * Remove stray 'c'
Diffstat (limited to 'plugins/ScheduledReports')
-rw-r--r--plugins/ScheduledReports/ScheduledReports.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/ScheduledReports/ScheduledReports.php b/plugins/ScheduledReports/ScheduledReports.php
index 2aebe4daaa..edb0a3e691 100644
--- a/plugins/ScheduledReports/ScheduledReports.php
+++ b/plugins/ScheduledReports/ScheduledReports.php
@@ -9,6 +9,7 @@
namespace Piwik\Plugins\ScheduledReports;
use Exception;
+use Piwik\Common;
use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\Log;
@@ -365,7 +366,9 @@ class ScheduledReports extends \Piwik\Plugin
// add unsubscribe links to content
if ($htmlContent) {
$link = SettingsPiwik::getPiwikUrl() . 'index.php?module=ScheduledReports&action=unsubscribe&token=' . $tokens[$email];
- $mail->setBodyHtml($htmlContent . '<br /><br /><hr /><br />'.Piwik::translate('ScheduledReports_UnsubscribeFooter', [' <a href="' . $link . '">' . Piwik::translate('ScheduledReports_Unsubscribe') . '</a>']));
+ $bodyContent = str_replace(ReportRenderer\Html::UNSUBSCRIBE_LINK_PLACEHOLDER, Common::sanitizeInputValue($link), $htmlContent);
+
+ $mail->setBodyHtml($bodyContent);
}
if ($textContent) {