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:21:31 UTC

svn commit: r1413308 - in /ofbiz/branches/release12.04: ./ framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java

Author: jleroux
Date: Sun Nov 25 09:21:30 2012
New Revision: 1413308

URL: http://svn.apache.org/viewvc?rev=1413308&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/release12.04/   (props changed)
    ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1413307

Modified: ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1413308&r1=1413307&r2=1413308&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java (original)
+++ ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java Sun Nov 25 09:21:30 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;