Don't duplicate the sentence with the header

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-04-12 11:52:33 +02:00 committed by Bjoern Schiessle
parent d0bae447fb
commit 506c7731a6
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
3 changed files with 8 additions and 4 deletions

View File

@ -264,7 +264,7 @@ class ShareByMailProvider implements IShareProvider {
$emailTemplate = $this->mailer->createEMailTemplate();
$emailTemplate->addHeader();
$emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$ownerDisplayName, $filename]));
$emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$ownerDisplayName, $filename]), false);
if ($owner === $initiator) {
$text = $this->l->t('%s shared »%s« with you.', [$ownerDisplayName, $filename]);

View File

@ -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;
}
}
/**

View File

@ -72,7 +72,8 @@ interface IEMailTemplate {
* 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
*
* @since 12.0.0
*/