diff --git a/Dockerfile b/Dockerfile index 55bd939ce8ad9f55fa72bb5f4b73060ac8586391..da0380c9e8b4fd3871588401d75f567cd1d87218 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG USER_MIGRATION_JOB_ID="991454" ARG MEMORIES_VERSION="7.3.1" ARG DROP_ACCOUNT_VERSION="2.5.0" -RUN sed -i 's/28,0,9,1/28,0,9,3/' ${BASE_DIR}/version.php +RUN sed -i 's/28,0,9,1/28,0,9,4/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -152,6 +152,9 @@ 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} # Custom theme diff --git a/patches/031-theme-custom-app-translations.patch b/patches/031-theme-custom-app-translations.patch index 7db4680e0d380b74477e4b9420d9bb15bb003caa..56f1433c96c45faf0125323f8e9616040f0c6e04 100644 --- a/patches/031-theme-custom-app-translations.patch +++ b/patches/031-theme-custom-app-translations.patch @@ -1,17 +1,19 @@ ---- ./lib/private/Template/JSResourceLocator.php 2024-03-15 19:15:38 -+++ ./lib/private/Template/JSResourceLocator-new.php 2024-03-15 19:16:54 -@@ -76,8 +76,12 @@ - $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.'core/'.$script); +--- ./lib/private/Template/JSResourceLocator.php 2024-08-29 22:10:30.588659044 +0530 ++++ ./lib/private/Template/JSResourceLocator-new.php 2024-08-29 23:55:00.239753244 +0530 +@@ -62,6 +62,7 @@ + // Handle symlinks + $appRoot = realpath($appRoot); + } ++ $appDirName = basename($appRoot); + // Get the app webroot + $appWebRoot = dirname($this->appManager->getAppWebPath($app)); + } catch (AppPathNotFoundException $e) { +@@ -77,7 +78,7 @@ $found += $this->appendScriptIfExist($this->serverroot, $script); $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.$script); -- $found += $this->appendScriptIfExist($appRoot, $script, $appWebRoot); + $found += $this->appendScriptIfExist($appRoot, $script, $appWebRoot); - $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.'apps/'.$script); -+ foreach (\OC::$APPSROOTS as $appRoot) { -+ $dirName = basename($appRoot['path']); -+ $rootPath = dirname($appRoot['path']); -+ $found += $this->appendIfExist($rootPath, $dirName.'/'.$script.'.js'); -+ $found += $this->appendIfExist($this->serverroot, $theme_dir.$dirName.'/'.$script.'.js'); -+ } ++ $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.$appDirName.'/'.$script); if ($found) { return; diff --git a/patches/037-mailer-template-fix.patch b/patches/037-mailer-template-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..5dca9ddc152c0fc0f2af420948edbf44d657628f --- /dev/null +++ b/patches/037-mailer-template-fix.patch @@ -0,0 +1,46 @@ +From: Avinash +Date: Thu, 29 Aug 2024 15:50:00 +0530 +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 +@@ -130,18 +130,6 @@ + * @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); +@@ -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, ++ $this->urlGenerator, ++ $this->l10nFactory, ++ $logoWidth, ++ $logoHeight, ++ $emailId, ++ $data ++ ); + } + + return new EMailTemplate( +