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: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f17e6fe6e191b0d99fb56cf9cfc2ac1bc1c5282e;p=contrib%2FConifer.git 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 fc4374ca3f..eceeb9b861 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -171,6 +171,10 @@ sub load_context { $cgi->cookie(OILS_HTTP_COOKIE_LOCALE) || $default_locale || parse_accept_lang($r->headers_in->get('Accept-Language')); + + # 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