From f095c5934102d1d5c8f10eb51d719b496d0afd81 Mon Sep 17 00:00:00 2001 From: Bilel KIHAL Date: Mon, 25 Nov 2024 20:11:16 +0100 Subject: [PATCH] Revert "fix can't change portal language" This reverts commit 462dc6d1dfa488bbf99c3d44ce756f635304b3b4. --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e6182c033..c27651a48 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -27,7 +27,7 @@ def set_locale cookies.permanent[:locale] = I18n.locale if cookies[:locale].nil? logger.debug "* Locale set to '#{I18n.locale}'" - I18n.locale = portal_lang unless portal_language_enabled?(I18n.locale) + I18n.locale = portal_lang if portal_language_enabled?(I18n.locale) session[:locale] = I18n.locale end @@ -430,7 +430,7 @@ def json_link(url, optional_params) optional_params_str = filtered_params.map { |param, value| "#{param}=#{value}" }.join("&") return base_url + optional_params_str + "&apikey=#{$API_KEY}" end - + def set_federated_portals RequestStore.store[:federated_portals] = params[:portals]&.split(',') end