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 11:19:30 UTC
svn commit: r1413318 - in /ofbiz/branches/release10.04: ./
framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
Author: jleroux
Date: Sun Nov 25 10:19:29 2012
New Revision: 1413318
URL: http://svn.apache.org/viewvc?rev=1413318&view=rev
Log:
"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-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/branches/release10.04/ (props changed)
ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
Propchange: ofbiz/branches/release10.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1413307
Modified: ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1413318&r1=1413317&r2=1413318&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java (original)
+++ ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java Sun Nov 25 10:19:29 2012
@@ -249,7 +249,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;