summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-12 11:52:58 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-04-12 17:16:26 +0200
commit1c8c62272c6862405c435e015c107b1767e43b9b (patch)
tree2b6cc6d8a951ffaac37c00c808f5299544d8e7bb
parent506c7731a6168e35bff28c32d9bea933aee907d4 (diff)
downloadnextcloud-server-1c8c62272c6862405c435e015c107b1767e43b9b.tar.gz
nextcloud-server-1c8c62272c6862405c435e015c107b1767e43b9b.zip
Use instance name as alt-text
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/Mail/EMailTemplate.php4
-rw-r--r--tests/data/emails/new-account-email-custom.html2
-rw-r--r--tests/data/emails/new-account-email-single-button.html2
-rw-r--r--tests/data/emails/new-account-email.html2
-rw-r--r--tests/lib/Mail/EMailTemplateTest.php4
5 files changed, 9 insertions, 5 deletions
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index f82ddc689eb..dd5cf605c99 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -98,7 +98,7 @@ EOF;
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%%">
- <img class="logo float-center" src="%s" alt="logo" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <img class="logo float-center" src="%s" alt="%s" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
</center>
</tr>
</tbody>
@@ -328,7 +328,7 @@ EOF;
$this->headerAdded = true;
$logoUrl = $this->urlGenerator->getAbsoluteURL($this->themingDefaults->getLogo());
- $this->htmlBody .= vsprintf($this->header, [$this->themingDefaults->getColorPrimary(), $logoUrl]);
+ $this->htmlBody .= vsprintf($this->header, [$this->themingDefaults->getColorPrimary(), $logoUrl, $this->themingDefaults->getName()]);
}
/**
diff --git a/tests/data/emails/new-account-email-custom.html b/tests/data/emails/new-account-email-custom.html
index c754412e681..a60902ae306 100644
--- a/tests/data/emails/new-account-email-custom.html
+++ b/tests/data/emails/new-account-email-custom.html
@@ -23,7 +23,7 @@
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
- <img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="logo" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
</center>
</tr>
</tbody>
diff --git a/tests/data/emails/new-account-email-single-button.html b/tests/data/emails/new-account-email-single-button.html
index c204bedb234..50763efa5b5 100644
--- a/tests/data/emails/new-account-email-single-button.html
+++ b/tests/data/emails/new-account-email-single-button.html
@@ -23,7 +23,7 @@
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
- <img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="logo" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
</center>
</tr>
</tbody>
diff --git a/tests/data/emails/new-account-email.html b/tests/data/emails/new-account-email.html
index 4fb6f5af15e..2e3866163d7 100644
--- a/tests/data/emails/new-account-email.html
+++ b/tests/data/emails/new-account-email.html
@@ -23,7 +23,7 @@
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
- <img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="logo" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
</center>
</tr>
</tbody>
diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php
index 664da6c17e5..f9e1ecf29ca 100644
--- a/tests/lib/Mail/EMailTemplateTest.php
+++ b/tests/lib/Mail/EMailTemplateTest.php
@@ -62,6 +62,10 @@ class EMailTemplateTest extends TestCase {
->expects($this->any())
->method('getLogo')
->willReturn('/img/logo-mail-header.png');
+ $this->defaults
+ ->expects($this->any())
+ ->method('getName')
+ ->willReturn('TestCloud');
$this->urlGenerator
->expects($this->once())
->method('getAbsoluteURL')