Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1da684b5 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

fix mailer patch

parent 03e907d9
Loading
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
From: Avinash <avinash.gusain.ext@murena.com>
Date: Thu, 29 Aug 2024 15:50:00 +0530
Subject: [PATCH] This actually fixes error introduces in 28.0.9  Mailer.php .We also created the PR so may be if that got merge
This May not be needed after that.

--- lib/private/Mail/Mailer.php	2024-08-29 15:55:02
+++ lib/private/Mail/Mailer-new.php	2024-08-29 15:56:18
@@ -131,17 +131,6 @@
 	 */
 	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);
@@ -165,6 +154,17 @@
 			}
 		} else {
 			$logoWidth = $logoHeight = null;
+		}
+        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(