svn commit: r563987 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java

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

svn commit: r563987 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java

byersa-3
Author: byersa
Date: Wed Aug  8 12:02:15 2007
New Revision: 563987

URL: http://svn.apache.org/viewvc?view=rev&rev=563987
Log:
Changed renderSubContentAsText to do a query without "mapKey" if it does not exist.

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?view=diff&rev=563987&r1=563986&r2=563987
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Wed Aug  8 12:02:15 2007
@@ -274,9 +274,10 @@
 
         // find the sub-content with matching mapKey
         List orderBy = UtilMisc.toList("-fromDate");
-        List exprs = UtilMisc.toList(new EntityExpr("contentId", EntityOperator.EQUALS, contentId),
-                //new EntityExpr("contentAssocTypeId", EntityOperator.EQUALS, "SUB_CONTENT"),
-                new EntityExpr("mapKey", EntityOperator.EQUALS, mapKey));
+        List exprs = UtilMisc.toList(new EntityExpr("contentId", EntityOperator.EQUALS, contentId));
+        if (UtilValidate.isNotEmpty(mapKey)) {
+                exprs.add(new EntityExpr("mapKey", EntityOperator.EQUALS, mapKey));
+        }
 
         List assocs;
         if (cache) {