aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristoph Klaffl <christoph@phreaker.eu>2024-08-22 19:39:23 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-08-26 07:01:05 +0000
commitda13234901d49412d8edf2957ff66f5b2717bf15 (patch)
tree2c8f2464273323e8dfbf4bbc3486fd6df50132cd /lib
parent344dda25c0a2b9f459a24588754633fde322a3eb (diff)
downloadnextcloud-server-da13234901d49412d8edf2957ff66f5b2717bf15.tar.gz
nextcloud-server-da13234901d49412d8edf2957ff66f5b2717bf15.zip
fix call to custom mail_template_class
Signed-off-by: Christoph Klaffl <christoph@phreaker.eu>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Mail/Mailer.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 77ba12c4852..2839c1c504e 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -130,18 +130,6 @@ class Mailer implements IMailer {
* @since 12.0.0
*/
public function createEMailTemplate(string $emailId, array $data = []): IEMailTemplate {
- $class = $this->config->getSystemValueString('mail_template_class', '');
-
- if ($class !== '' && class_exists($class) && is_a($class, EMailTemplate::class, true)) {
- return new $class(
- $this->defaults,
- $this->urlGenerator,
- $this->l10nFactory,
- $emailId,
- $data
- );
- }
-
$logoDimensions = $this->config->getAppValue('theming', 'logoDimensions', self::DEFAULT_DIMENSIONS);
if (str_contains($logoDimensions, 'x')) {
[$width, $height] = explode('x', $logoDimensions);
@@ -167,6 +155,20 @@ class Mailer implements IMailer {
$logoWidth = $logoHeight = null;
}
+ $class = $this->config->getSystemValueString('mail_template_class', '');
+
+ if ($class !== '' && class_exists($class) && is_a($class, EMailTemplate::class, true)) {
+ return new $class(
+ $this->defaults,
+ $this->urlGenerator,
+ $this->l10nFactory,
+ $logoWidth,
+ $logoHeight,
+ $emailId,
+ $data
+ );
+ }
+
return new EMailTemplate(
$this->defaults,
$this->urlGenerator,