From a2521d36859d4062383e48e1bf5389ceb950c7e1 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 17 Aug 2012 10:10:55 -0400 Subject: [PATCH] Set the default CStoreEditor locale on page load Ech CStoreEditor request will use the locale of the current page as the default opensrf session locale. Signed-off-by: Bill Erickson Signed-off-by: Dan Scott --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 25285b1256..02cf017cbd 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -170,6 +170,10 @@ sub load_context { $cgi->cookie(OILS_HTTP_COOKIE_LOCALE) || parse_accept_lang($r->headers_in->get('Accept-Language')) || 'en_us'; + + # set the editor default locale for each page load + $OpenILS::Utils::CStoreEditor::default_locale = $ctx->{locale}; + my $mprefix = $ctx->{media_prefix}; if($mprefix and $mprefix !~ /^http/ and $mprefix !~ /^\//) { # if a hostname is provided /w no protocol, match the protocol to the current page -- 2.11.0