svn commit: r596081 - /ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml

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

svn commit: r596081 - /ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml

jleroux@apache.org
Author: jleroux
Date: Sun Nov 18 03:20:19 2007
New Revision: 596081

URL: http://svn.apache.org/viewvc?rev=596081&view=rev
Log:
Applied fix from trunk for revision: 595582

Modified:
    ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml

Modified: ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml?rev=596081&r1=596080&r2=596081&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml (original)
+++ ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml Sun Nov 18 03:20:19 2007
@@ -48,6 +48,11 @@
 
     <simple-method method-name="addProductCategoryToProdCatalog" short-description="Add Category To ProdCatalog">
         <check-permission permission="CATALOG" action="_CREATE"><fail-message message="Security Error: to run addProductCategoryToProdCatalog you must have the CATALOG_CREATE or CATALOG_ADMIN permission"/></check-permission>
+        <!-- Check that the ProductCategory exists -->
+        <entity-one entity-name="ProductCategory" value-name="productCategory"/>
+        <if-empty field-name="productCategory">
+            <add-error><fail-property resource="ProductUiLabels" property="ProductCategoryNotFoundforCategoryID"/></add-error>
+        </if-empty>
         <check-errors/>
 
         <make-value value-name="newEntity" entity-name="ProdCatalogCategory"/>