You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/11/25 10:20:24 UTC
svn commit: r1413307 -
/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
Author: jleroux
Date: Sun Nov 25 09:20:23 2012
New Revision: 1413307
URL: http://svn.apache.org/viewvc?rev=1413307&view=rev
Log:
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-5083
This 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;