aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-12-10 09:39:00 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-12-16 07:17:32 +0000
commit0011d83bccbd4a9d0a225d5be61e016ca24d807f (patch)
treea0fc9672b2d379359a3263ce2ae2d99bb2383a5c /apps
parent748f7dbbbec887f5cf8e6927c106e58f8906bee7 (diff)
downloadnextcloud-server-0011d83bccbd4a9d0a225d5be61e016ca24d807f.tar.gz
nextcloud-server-0011d83bccbd4a9d0a225d5be61e016ca24d807f.zip
fix(share): Don't print twice the same informationbackport/49746/stable30
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php4
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php24
2 files changed, 7 insertions, 21 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index fd844128827..d159e4ef5e0 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -331,7 +331,6 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider
$emailTemplate->setSubject($this->l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]));
$emailTemplate->addHeader();
$emailTemplate->addHeading($this->l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]), false);
- $text = $this->l->t('%1$s shared %2$s with you.', [$initiatorDisplayName, $filename]);
if ($note !== '') {
$emailTemplate->addBodyListItem(
@@ -352,8 +351,7 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider
}
$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/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index ae5d768b624..92219a7e9bb 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -1305,10 +1305,7 @@ class ShareByMailProviderTest extends TestCase {
$template
->expects($this->once())
->method('addBodyText')
- ->with(
- 'Mrs. Owner User shared file.txt with you. Click the button below to open it.',
- 'Mrs. Owner User shared file.txt with you.'
- );
+ ->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')
@@ -1418,7 +1415,7 @@ class ShareByMailProviderTest extends TestCase {
$template
->expects($this->once())
->method('addBodyText')
- ->with('Mrs. Owner User shared file.txt with you. Click the button below to open it.', 'Mrs. Owner User shared file.txt with you.');
+ ->with('Click the button below to open it.');
$this->urlGenerator->expects($this->once())->method('imagePath')
->with('core', 'caldav/description.png')
@@ -1544,7 +1541,7 @@ class ShareByMailProviderTest extends TestCase {
$template
->expects($this->once())
->method('addBodyText')
- ->with('Mrs. Owner User shared file.txt with you. Click the button below to open it.', 'Mrs. Owner User shared file.txt with you.');
+ ->with('Click the button below to open it.');
$expiration = new DateTime('2001-01-01');
$this->l->expects($this->once())
@@ -1676,10 +1673,7 @@ class ShareByMailProviderTest extends TestCase {
$template
->expects($this->once())
->method('addBodyText')
- ->with(
- 'Mr. Initiator User shared file.txt with you. Click the button below to open it.',
- 'Mr. Initiator User shared file.txt with you.'
- );
+ ->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')
@@ -1780,10 +1774,7 @@ class ShareByMailProviderTest extends TestCase {
$template
->expects($this->once())
->method('addBodyText')
- ->with(
- 'Mrs. Owner User shared file.txt with you. Click the button below to open it.',
- 'Mrs. Owner User shared file.txt with you.'
- );
+ ->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')
@@ -1888,10 +1879,7 @@ class ShareByMailProviderTest extends TestCase {
$template
->expects($this->once())
->method('addBodyText')
- ->with(
- 'Mr. Initiator User shared file.txt with you. Click the button below to open it.',
- 'Mr. Initiator User shared file.txt with you.'
- );
+ ->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')