From: Bill Erickson Date: Fri, 17 Aug 2012 14:10:55 +0000 (-0400) Subject: Set the default CStoreEditor locale on page load X-Git-Url: http://git.equinoxoli.org/?p=transitory.git;a=commitdiff_plain;h=7339fcdfdc41e6dee2fc7a5eac058313646342d4 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 --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 25285b1..02cf017 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