From 858f578f84918e35cc883f429fff126a9f13cfbe Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 22 Jun 2021 13:43:12 +0200 Subject: [PATCH] mail-template - don't show hyphen if slogan is empty Signed-off-by: szaimen --- lib/private/Mail/EMailTemplate.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index b04fa903ba8..efe1a6eef1d 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -619,7 +619,11 @@ EOF; public function addFooter(string $text = '', ?string $lang = null) { if ($text === '') { $l10n = $this->l10nFactory->get('lib', $lang); - $text = $this->themingDefaults->getName() . ' - ' . $this->themingDefaults->getSlogan($lang) . '
' . $l10n->t('This is an automatically sent email, please do not reply.'); + $slogan = $this->themingDefaults->getSlogan($lang); + if ($slogan !== '') { + $slogan = ' - ' . $slogan; + } + $text = $this->themingDefaults->getName() . $slogan . '
' . $l10n->t('This is an automatically sent email, please do not reply.'); } if ($this->footerAdded) {