[CMF-checkins] CVS: CMF/CMFCalendar - CalendarTool.py:1.8.10.2
Stefan H. Holek
stefan at epy.co.at
Sun Apr 18 15:23:56 EDT 2004
Update of /cvs-repository/CMF/CMFCalendar
In directory cvs.zope.org:/tmp/cvs-serv15784/CMFCalendar
Modified Files:
Tag: CMF-1_4-branch
CalendarTool.py
Log Message:
Converted '_usage' queries to dictionary syntax. Shuts up DeprecationWarnings in Zope 2.7.
=== CMF/CMFCalendar/CalendarTool.py 1.8.10.1 => 1.8.10.2 ===
--- CMF/CMFCalendar/CalendarTool.py:1.8.10.1 Fri May 23 13:32:07 2003
+++ CMF/CMFCalendar/CalendarTool.py Sun Apr 18 15:23:55 2004
@@ -134,10 +134,10 @@
query=self.portal_catalog(portal_type=self.calendar_types,
review_state='published',
- start=last_date,
- start_usage='range:max',
- end=first_date,
- end_usage='range:min',
+ start={'query': last_date,
+ 'range': 'max'},
+ end={'query': first_date,
+ 'range': 'min'},
sort_on='start')
# compile a list of the days that have events
@@ -202,22 +202,22 @@
# Get all events that Start on this day
query=self.portal_catalog(portal_type=self.calendar_types,
review_state='published',
- start=(first_date,last_date),
- start_usage='range:min:max')
+ start={'query': (first_date,last_date),
+ 'range': 'min:max'})
# Get all events that End on this day
query+=self.portal_catalog(portal_type=self.calendar_types,
review_state='published',
- end=(first_date,last_date),
- end_usage='range:min:max')
+ end={'query': (first_date,last_date),
+ 'range': 'min:max'})
# Get all events that Start before this day AND End after this day
query+=self.portal_catalog(portal_type=self.calendar_types,
review_state='published',
- start=first_date,
- start_usage='range:max',
- end=last_date,
- end_usage='range:min')
+ start={'query': first_date,
+ 'range': 'max'},
+ end={'query': last_date,
+ 'range': 'min'})
# Unique the results
results = []
More information about the CMF-checkins
mailing list