Author: hansbak
Date: Thu May 10 05:30:26 2007
New Revision: 536846
URL:
http://svn.apache.org/viewvc?view=rev&rev=536846Log:
jira issue OFBIZ-975 patch providedby nicolas malin
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java?view=diff&rev=536846&r1=536845&r2=536846==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java Thu May 10 05:30:26 2007
@@ -290,14 +290,17 @@
*/
public static Map sendMailFromScreen(DispatchContext dctx, Map serviceContext) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- Locale locale = (Locale) serviceContext.get("locale");
String webSiteId = (String) serviceContext.remove("webSiteId");
String bodyText = (String) serviceContext.remove("bodyText");
String bodyScreenUri = (String) serviceContext.remove("bodyScreenUri");
String xslfoAttachScreenLocation = (String) serviceContext.remove("xslfoAttachScreenLocation");
String attachmentName = (String) serviceContext.remove("attachmentName");
Map bodyParameters = (Map) serviceContext.remove("bodyParameters");
- bodyParameters.put("locale", locale);
+ Locale locale = (Locale) serviceContext.get("locale");
+ if( ! bodyParameters.containsKey("locale") )
+ bodyParameters.put("locale", locale);
+ else
+ locale = (Locale) bodyParameters.get("locale");
String partyId = (String) bodyParameters.get("partyId");
NotificationServices.setBaseUrl(dctx.getDelegator(), webSiteId, bodyParameters);
String contentType = (String) serviceContext.remove("contentType");