Small patch for ProductEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Small patch for ProductEvents.java

Scott Gray
Attached is a tiny patch for ProductEvents.java updateAttribute.  The
code is checking to see if productId is empty twice, instead of checking
productId and AttrName.

Regards
Scott

Index: applications/product/src/org/ofbiz/product/product/ProductEvents.java
===================================================================
--- applications/product/src/org/ofbiz/product/product/ProductEvents.java (revision 431144)
+++ applications/product/src/org/ofbiz/product/product/ProductEvents.java (working copy)
@@ -600,7 +600,7 @@
 
         if (!UtilValidate.isNotEmpty(productId))
             errMsg += ("<li>" + UtilProperties.getMessage(resource,"productevents.product_ID_missing", UtilHttp.getLocale(request)));
-        if (!UtilValidate.isNotEmpty(productId))
+        if (!UtilValidate.isNotEmpty(attrName))
             errMsg += ("<li>" + UtilProperties.getMessage(resource,"productevents.attribute_name_missing", UtilHttp.getLocale(request)));
         if (errMsg.length() > 0) {
             errMsg += ("<b>" + UtilProperties.getMessage(resource,"productevents.following_errors_occurred", UtilHttp.getLocale(request)));
Reply | Threaded
Open this post in threaded view
|

Re: Small patch for ProductEvents.java

Jacopo Cappellato
Thanks Scott,

your patch is in rev. 431145

Jacopo

Scott Gray wrote:

> Attached is a tiny patch for ProductEvents.java updateAttribute.  The
> code is checking to see if productId is empty twice, instead of checking
> productId and AttrName.
>
> Regards
> Scott
>
>
> ------------------------------------------------------------------------
>
> Index: applications/product/src/org/ofbiz/product/product/ProductEvents.java
> ===================================================================
> --- applications/product/src/org/ofbiz/product/product/ProductEvents.java (revision 431144)
> +++ applications/product/src/org/ofbiz/product/product/ProductEvents.java (working copy)
> @@ -600,7 +600,7 @@
>  
>          if (!UtilValidate.isNotEmpty(productId))
>              errMsg += ("<li>" + UtilProperties.getMessage(resource,"productevents.product_ID_missing", UtilHttp.getLocale(request)));
> -        if (!UtilValidate.isNotEmpty(productId))
> +        if (!UtilValidate.isNotEmpty(attrName))
>              errMsg += ("<li>" + UtilProperties.getMessage(resource,"productevents.attribute_name_missing", UtilHttp.getLocale(request)));
>          if (errMsg.length() > 0) {
>              errMsg += ("<b>" + UtilProperties.getMessage(resource,"productevents.following_errors_occurred", UtilHttp.getLocale(request)));