Author: byersa
Date: Wed Aug 8 12:02:15 2007
New Revision: 563987
URL:
http://svn.apache.org/viewvc?view=rev&rev=563987Log:
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) {