From aa5a0ab9798843cda578d949f5c33f0dca63d962 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:39:00 +0100 Subject: [PATCH] fix(share): Don't print twice the same information Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- apps/sharebymail/lib/ShareByMailProvider.php | 3 +-- lib/private/Share20/DefaultShareProvider.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 9efc0ec2513a8..ffd948aee56c5 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -354,8 +354,7 @@ protected function sendEmail(IShare $share, array $emails): void { } $emailTemplate->addBodyText( - htmlspecialchars($text . ' ' . $this->l->t('Click the button below to open it.')), - $text + $this->l->t('Click the button below to open it.') ); $emailTemplate->addBodyButton( diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 40fbae541ce59..888f0876c5ce4 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -1522,9 +1522,9 @@ protected function sendUserShareMail( } $emailTemplate->addBodyText( - htmlspecialchars($text . ' ' . $l->t('Click the button below to open it.')), - $text + $l->t('Click the button below to open it.') ); + $emailTemplate->addBodyButton( $l->t('Open »%s«', [$filename]), $link