mirror of
https://github.com/nextcloud/server.git
synced 2026-06-05 14:56:35 -04:00
fix call to custom mail_template_class
Signed-off-by: Christoph Klaffl <christoph@phreaker.eu>
This commit is contained in:
parent
344dda25c0
commit
da13234901
1 changed files with 14 additions and 12 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue