Author: jleroux
Date: Mon Oct 18 10:02:23 2010
New Revision: 1023719
URL: http://svn.apache.org/viewvc?rev=1023719&view=rev
Log:
A patch from Sascha Rodekamp "sendMailFrom Screen don't need to load uiLabels"
(https://issues.apache.org/jira/browse/OFBIZ-3969) - OFBIZ-3969
Sascha: I noticed an issue in the sendOrderNotificationScreen method. There is
no need of loading uiLabels in the method, because the labels will be loaded in
the screen (which will be used for the email). The point is, when someone (for
whatever reason) don't add English uiLabels and the service try to access the
default English labels the an exception will be thrown . This can be simply
avoided.
The patch was 1st applied at r1003836, but I finally reverted it at r100390
because I'd like to be sure there were no issues. According to Sascha, there
should be any since all needed labels are loaded in screens before triggering
the mail service.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1023719&r1=1023718&r2=1023719&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
Mon Oct 18 10:02:23 2010
@@ -1968,7 +1968,7 @@ public class OrderServices {
return
ServiceUtil.returnError((String)resp.get(ModelService.ERROR_MESSAGE));
}
}
-
+
// log an order note
try {
BigDecimal quantity = thisCancelQty.setScale(1,
orderRounding);
@@ -2430,11 +2430,7 @@ public class OrderServices {
locale = Locale.getDefault();
}
- ResourceBundleMapWrapper uiLabelMap = (ResourceBundleMapWrapper)
UtilProperties.getResourceBundleMap("EcommerceUiLabels", locale);
- uiLabelMap.addBottomResourceBundle("OrderUiLabels");
- uiLabelMap.addBottomResourceBundle("CommonUiLabels");
-
- Map bodyParameters = UtilMisc.toMap("orderId", orderId,
"orderItemSeqId", orderItemSeqId, "userLogin", placingUserLogin, "uiLabelMap",
uiLabelMap, "locale", locale);
+ Map bodyParameters = UtilMisc.toMap("orderId", orderId,
"orderItemSeqId", orderItemSeqId, "userLogin", placingUserLogin, "locale",
locale);
if (placingParty!= null) {
bodyParameters.put("partyId", placingParty.get("partyId"));
}