Update of /var/cvs/contributions/natmm/templates/natmm/rss
In directory james.mmbase.org:/tmp/cvs-serv27290/templates/natmm/rss
Modified Files:
xmlactiviteiten.jsp
Log Message:
NMCMS-531
See also: http://cvs.mmbase.org/viewcvs/contributions/natmm/templates/natmm/rss
See also: http://www.mmbase.org/jira/browse/NMCMS-531
Index: xmlactiviteiten.jsp
===================================================================
RCS file: /var/cvs/contributions/natmm/templates/natmm/rss/xmlactiviteiten.jsp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- xmlactiviteiten.jsp 23 May 2008 12:26:24 -0000 1.8
+++ xmlactiviteiten.jsp 7 Jul 2008 09:08:08 -0000 1.9
@@ -4,15 +4,32 @@
%><[EMAIL PROTECTED] uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm"
%><[EMAIL PROTECTED] uri="http://www.opensymphony.com/oscache" prefix="cache"
%><mm:cloud jspvar="cloud"
-><cache:cache time="<%= 3600*24 %>" scope="application"><%
+><%
String sPageTemplateURL = "";
String DATA_FORMAT ="E, dd MMM yyyy, H:mm";
%><[EMAIL PROTECTED] file="../includes/time.jsp" %><%
+
+int iSearchNumberOfDays = 7;
+String pSearchNumberOfDays = request.getParameter("dagen");
+pSearchNumberOfDays = (pSearchNumberOfDays == null ? "" :
HtmlCleaner.filterAmps(pSearchNumberOfDays).trim());
+
+// SearchNumberOfDays is default 7 and cannot be more than 365
+if (!"".equals(pSearchNumberOfDays)) {
+ try {
+ iSearchNumberOfDays = Integer.valueOf(pSearchNumberOfDays).intValue();
+ }
+ catch (NumberFormatException nfe) {
+ System.out.print("xmlactiviteiten.jsp: value of parameter 'dagen' (" +
pSearchNumberOfDays + ") is not a number!");
+ }
+ if (iSearchNumberOfDays > 365) iSearchNumberOfDays = 365;
+}
+
+
long lDateSearchFrom = nowSec;
-long lDateSearchTill = lDateSearchFrom + 7*24*60*60;
+long lDateSearchTill = lDateSearchFrom + iSearchNumberOfDays*24*60*60;
if(application.getAttribute("events_till")==null){
EventNotifier.updateAppAttributes(cloud);
@@ -197,9 +214,8 @@
></channel>
</mm:list
></rss>
-</mm:locale
-></cache:cache
-></mm:cloud>
+</mm:locale>
+</mm:cloud>
<%!
private String priceFormating(String sPrice)
{
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs