From 86265320b892143c768a14054ab16678cfa2d256 Mon Sep 17 00:00:00 2001 From: Stephan Müller Date: Sun, 10 Sep 2017 16:33:58 +0200 Subject: do not show hyphen after instance name in emails if slogan does not exist Signed-off-by: Roeland Jago Douma --- apps/sharebymail/lib/ShareByMailProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 9a0678f5fe7..516e4e243bf 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -423,7 +423,7 @@ class ShareByMailProvider implements IShareProvider { $initiatorEmail = $initiatorUser->getEMailAddress(); if($initiatorEmail !== null) { $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); + $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); } else { $emailTemplate->addFooter(); } -- cgit v1.2.3 From f7790c2960f4fd509df7d93cca7e6441e7de89f3 Mon Sep 17 00:00:00 2001 From: Stephan Müller Date: Sun, 10 Sep 2017 23:59:11 +0200 Subject: expect call of getSlogan() exactly twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Müller Signed-off-by: Roeland Jago Douma --- apps/sharebymail/tests/ShareByMailProviderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 9ab9dbef4a1..23e61ee58f1 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -828,7 +828,7 @@ class ShareByMailProviderTest extends TestCase { ->method('setReplyTo') ->with(['owner@example.com' => 'Mrs. Owner User']); $this->defaults - ->expects($this->once()) + ->expects($this->exactly(2)) ->method('getSlogan') ->willReturn('Testing like 1990'); $template -- cgit v1.2.3