diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-11 17:24:58 -0500 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-12 15:19:53 -0500 |
commit | 1f962f91154b04c5ec49df14a3e0aa2f4905e1c6 (patch) | |
tree | b14c931198014bfc26fdbca420889fb26dc5eb91 /lib/private/Mail | |
parent | b3b24172e48d11e1247db84bfec5b6650883a7a4 (diff) | |
download | nextcloud-server-1f962f91154b04c5ec49df14a3e0aa2f4905e1c6.tar.gz nextcloud-server-1f962f91154b04c5ec49df14a3e0aa2f4905e1c6.zip |
Update email template for lost password email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Mail')
-rw-r--r-- | lib/private/Mail/EMailTemplate.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 805126d2ad8..c0949b91c42 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -423,10 +423,12 @@ EOF; * * @param string $text Text of button * @param string $url URL of button + * @param string $plainText Text of button in plain text version + * if empty the $text is used, if false none will be used * * @since 12.0.0 */ - public function addBodyButton($text, $url) { + public function addBodyButton($text, $url, $plainText = '') { if ($this->footerAdded) { return; } @@ -436,9 +438,18 @@ EOF; $this->bodyOpened = true; } + if ($plainText === '') { + $plainText = $text; + } + $color = $this->themingDefaults->getColorPrimary(); $this->htmlBody .= vsprintf($this->button, [$color, $color, $url, $color, htmlspecialchars($text)]); - $this->plainBody .= $text . ': ' . $url . PHP_EOL; + + if ($plainText !== false) { + $this->plainBody .= $plainText . ': '; + } + + $this->plainBody .= $url . PHP_EOL; } |