summaryrefslogtreecommitdiffstats
path: root/lib/private/Mail
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-12 11:52:33 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-04-12 17:16:26 +0200
commit506c7731a6168e35bff28c32d9bea933aee907d4 (patch)
tree6d7c607c4dc1c653665e6e34c426916e771810cd /lib/private/Mail
parentd0bae447fb4a8ad6e7b3d51390cb9a2bdbf24591 (diff)
downloadnextcloud-server-506c7731a6168e35bff28c32d9bea933aee907d4.tar.gz
nextcloud-server-506c7731a6168e35bff28c32d9bea933aee907d4.zip
Don't duplicate the sentence with the header
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Mail')
-rw-r--r--lib/private/Mail/EMailTemplate.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index bfaee72bedd..f82ddc689eb 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -353,7 +353,8 @@ EOF;
* Adds a paragraph to the body of the email
*
* @param string $text
- * @param string $plainText Text that is used in the plain text email - if empty the $text is used
+ * @param string|bool $plainText Text that is used in the plain text email
+ * if empty the $text is used, if false none will be used
*/
public function addBodyText($text, $plainText = '') {
if ($this->footerAdded) {
@@ -369,7 +370,9 @@ EOF;
}
$this->htmlBody .= vsprintf($this->bodyText, [htmlspecialchars($text)]);
- $this->plainBody .= $plainText . PHP_EOL . PHP_EOL;
+ if ($plainText !== false) {
+ $this->plainBody .= $plainText . PHP_EOL . PHP_EOL;
+ }
}
/**