Update of
/var/cvs/contributions/CMSContainer/cmsc/portlets/src/java/com/finalist/cmsc/portlets
In directory
james.mmbase.org:/tmp/cvs-serv18006/cmsc/portlets/src/java/com/finalist/cmsc/portlets
Modified Files:
Tag: b1_5
ContentChannelPortlet.java
Log Message:
CMSC-1189 - Add age constraint to contentchannel portlets: improve performance
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/portlets/src/java/com/finalist/cmsc/portlets
See also: http://www.mmbase.org/jira/browse/CMSC-1189
Index: ContentChannelPortlet.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/portlets/src/java/com/finalist/cmsc/portlets/ContentChannelPortlet.java,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -u -b -r1.13.2.1 -r1.13.2.2
--- ContentChannelPortlet.java 18 Dec 2008 09:22:32 -0000 1.13.2.1
+++ ContentChannelPortlet.java 19 Dec 2008 14:05:04 -0000 1.13.2.2
@@ -188,9 +188,9 @@
useLifecycleBool = false;
}
- int maxDays = Integer.parseInt(preferences.getValue(MAX_DAYS, "-1"));
- if(maxDays <= 0){
- maxDays = Integer.MAX_VALUE;
+ int maxDays = Integer.parseInt(preferences.getValue(MAX_DAYS, "0"));
+ if(maxDays < 0){
+ maxDays = 0;
}
int totalItems = countContentElements(req, contenttypes, channel,
offset, orderby, direction, archive,
elementsPerPage, year, month, day, useLifecycleBool, maxDays);
@@ -199,7 +199,7 @@
}
List<ContentElement> elements = getContentElements(req, contenttypes,
channel, offset, orderby, direction,
- archive, elementsPerPage, year, month, day,
useLifecycleBool,maxDays);
+ archive, elementsPerPage, year, month, day, useLifecycleBool,
maxDays);
setAttribute(req, ELEMENTS, elements);
if (contenttypes != null && !contenttypes.isEmpty()) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs