Author: jleroux
Date: Sun Nov 25 09:54:52 2012
New Revision: 1413310
URL:
http://svn.apache.org/viewvc?rev=1413310&view=revLog:
"Applied fix from trunk for revision: 1413307 "
------------------------------------------------------------------------
r1413307 | jleroux | 2012-11-25 10:20:23 +0100 (dim., 25 nov. 2012) | 8 lines
A patch from Sergei Biletnikov "Remote services via XMLRpc ignore the locale which is passed as the service parameter, the default locale is used forever"
https://issues.apache.org/jira/browse/OFBIZ-5083This code replaces the possible locale from parameters by default locale.
// add the locale to the context
context.put("locale", Locale.getDefault());
The solution is simple: firstly check, if we have the locale as the parameter, if no, use the default locale.
------------------------------------------------------------------------
Modified:
ofbiz/branches/release11.04/ (props changed)
ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1413307
Modified: ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1413310&r1=1413309&r2=1413310&view=diff==============================================================================
--- ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java (original)
+++ ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java Sun Nov 25 09:54:52 2012
@@ -248,7 +248,9 @@ public class XmlRpcEventHandler extends
}
// add the locale to the context
- context.put("locale", Locale.getDefault());
+ if (context.get("locale") == null) {
+ context.put("locale", Locale.getDefault());
+ }
// invoke the service
Map<String, Object> resp;