aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Mail
diff options
context:
space:
mode:
authorChristoph Klaffl <christoph@phreaker.eu>2024-08-22 19:39:23 +0200
committerChristoph Klaffl <christoph@phreaker.eu>2024-08-22 19:39:23 +0200
commitae787c5ef27c08ca26d5c14045029c6cf73cdb4a (patch)
tree5e0c6301525831d789b4aafd758cdda44c9bc20b /lib/private/Mail
parent1b39abb5014f70c60aeed93ee726491d05380122 (diff)
downloadnextcloud-server-ae787c5ef27c08ca26d5c14045029c6cf73cdb4a.tar.gz
nextcloud-server-ae787c5ef27c08ca26d5c14045029c6cf73cdb4a.zip
fix call to custom mail_template_class
Signed-off-by: Christoph Klaffl <christoph@phreaker.eu>
Diffstat (limited to 'lib/private/Mail')
-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 4ddb748fc26..71d9aca9aeb 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -103,18 +103,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);
@@ -140,6 +128,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,