From 0039b4a4dbbfacd9d0ee3e0fe2b6006b58348958 Mon Sep 17 00:00:00 2001 From: Akhil Date: Mon, 11 Dec 2023 14:28:07 +0530 Subject: [PATCH] getlanguage from request improved in patch --- Dockerfile | 2 +- patches/032-select-lang-from-session.patch | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c5c90752..2a7a82a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ ARG SNAPPY_THEME_VERSION="3.0.0" ARG USER_MIGRATION_JOB_ID="608716" ARG MEMORIES_VERSION="5.4.1" -RUN sed -i 's/26,0,8,2/26,0,8,12/' ${BASE_DIR}/version.php +RUN sed -i 's/26,0,8,2/26,0,8,13/' ${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 diff --git a/patches/032-select-lang-from-session.patch b/patches/032-select-lang-from-session.patch index 6e8d456a..52e5e8fc 100644 --- a/patches/032-select-lang-from-session.patch +++ b/patches/032-select-lang-from-session.patch @@ -6,13 +6,10 @@ $_SERVER in IRequest is immutable but we want to switch the header to deliver tr --- lib/private/L10N/Factory.php 2023-11-29 17:46:48.253716340 +0530 +++ lib/private/L10N/Factory-new.php 2023-11-29 17:47:26.194920628 +0530 -@@ -478,7 +478,11 @@ - * @throws LanguageNotFoundException +@@ -479,6 +479,9 @@ */ private function getLanguageFromRequest(?string $app = null): string { -- $header = $this->request->getHeader('ACCEPT_LANGUAGE'); -+ // $header = $this->request->getHeader('ACCEPT_LANGUAGE'); -+ $header = ''; + $header = $this->request->getHeader('ACCEPT_LANGUAGE'); + if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + $header = $_SERVER['HTTP_ACCEPT_LANGUAGE']; + } -- GitLab