Author: jleroux
Date: Sun Nov 25 09:20:23 2012
New Revision: 1413307
URL:
http://svn.apache.org/viewvc?rev=1413307&view=revLog:
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/trunk/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1413307&r1=1413306&r2=1413307&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java Sun Nov 25 09:20:23 2012
@@ -258,7 +258,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;