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 2010/10/02 19:14:51 UTC

svn commit: r1003836 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Author: jleroux
Date: Sat Oct  2 17:14:51 2010
New Revision: 1003836

URL: http://svn.apache.org/viewvc?rev=1003836&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.

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=1003836&r1=1003835&r2=1003836&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 Sat Oct  2 17:14:51 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"));
         }
@@ -3898,7 +3894,7 @@ public class OrderServices {
         toStore.addAll(cart.makeAllOrderPaymentInfos(dispatcher));
         toStore.addAll(cart.makeAllOrderItemAttributes(orderId, ShoppingCart.FILLED_ONLY));
 
-        // get the empty order item atrributes from the cart and remove them
+        // get the empty order item attributes from the cart and remove them
         List toRemove = FastList.newInstance();
         toRemove.addAll(cart.makeAllOrderItemAttributes(orderId, ShoppingCart.EMPTY_ONLY));