Update of 
/var/cvs/contributions/CMSContainer/cmsc/portlets/src/java/com/finalist/cmsc/portlets
In directory 
james.mmbase.org:/tmp/cvs-serv17983/cmsc/portlets/src/java/com/finalist/cmsc/portlets

Modified Files:
        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.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ContentChannelPortlet.java  18 Dec 2008 09:56:44 -0000      1.14
+++ ContentChannelPortlet.java  19 Dec 2008 14:04:58 -0000      1.15
@@ -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
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to