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

Commit 0fa41107 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

patch modified

parent a94921e9
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -152,6 +152,8 @@ RUN patch -u ${BASE_DIR}/lib/private/Template/JSResourceLocator.php -i ${TMP_PAT
RUN patch -u ${BASE_DIR}/lib/private/L10N/Factory.php -i ${TMP_PATCH_DIR}/032-select-lang-from-session.patch
# UserConfigChangedEvent Ref: https://github.com/nextcloud/server/pull/42039
RUN cd ${BASE_DIR} && patch -p1 < ${TMP_PATCH_DIR}/036-user-config-change-event.patch

# fixed Mailer.php error which is fixed in upstream,so we need to remove this in Nextcloud 29 upgrade
RUN patch -u ${BASE_DIR}/lib/private/Mail/Mailer.php -i ${TMP_PATCH_DIR}/037-mailer-template-fix.patch
RUN rm -rf ${TMP_PATCH_DIR}

+9 −4
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 then we need to delete this patch
Subject: [PATCH] This actually fixes error introduces in 28.0.9  Mailer.php .Already fixed on Stable 28,29 and 30. Not needed in next upgrade.

--- 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 @@
@@ -130,18 +130,6 @@
 	 * @since 12.0.0
 	 */
 	public function createEMailTemplate(string $emailId, array $data = []): IEMailTemplate {
 		$class = $this->config->getSystemValueString('mail_template_class', '');
-		$class = $this->config->getSystemValueString('mail_template_class', '');
-
-		if ($class !== '' && class_exists($class) && is_a($class, EMailTemplate::class, true)) {
-			return new $class(
@@ -22,11 +23,13 @@ Subject: [PATCH] This actually fixes error introduces in 28.0.9 Mailer.php .We
 		$logoDimensions = $this->config->getAppValue('theming', 'logoDimensions', self::DEFAULT_DIMENSIONS);
 		if (str_contains($logoDimensions, 'x')) {
 			[$width, $height] = explode('x', $logoDimensions);
@@ -165,6 +154,17 @@
@@ -165,6 +153,19 @@
 			}
 		} else {
 			$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,
@@ -39,3 +42,5 @@ Subject: [PATCH] This actually fixes error introduces in 28.0.9 Mailer.php .We
+			);
 		}
 
 		return new EMailTemplate(