[CMF-checkins] CVS: CMF/CMFCalendar - Event.py:1.7.28.3

Tres Seaver tseaver@zope.com
Sat, 19 Oct 2002 12:19:48 -0400


Update of /cvs-repository/CMF/CMFCalendar
In directory cvs.zope.org:/tmp/cvs-serv18038

Modified Files:
      Tag: CMF-1_3-branch
	Event.py 
Log Message:
 - Merge Christian Theune's fix for Collector #76 from head.

=== CMF/CMFCalendar/Event.py 1.7.28.2 => 1.7.28.3 ===
--- CMF/CMFCalendar/Event.py:1.7.28.2	Tue Aug  6 20:22:32 2002
+++ CMF/CMFCalendar/Event.py	Sat Oct 19 12:19:47 2002
@@ -24,7 +24,6 @@
 from Products.CMFCore.WorkflowCore import WorkflowAction
 
 # Import permission names
-from Products.CMFCore import CMFCorePermissions
 from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent
 from Products.CMFDefault.utils import formatRFC822Headers, html_headcheck
 from Products.CMFDefault.utils import SimpleHTMLParser, bodyfinder, parseHeadersBody
@@ -46,7 +45,7 @@
      'actions': ({'id': 'view',
                   'name': 'View',
                   'action': 'event_view',
-                  'permissions': (CMFCorePermissions.View,)},
+                  'permissions': (View,)},
                  {'id': 'edit',
                   'name': 'Edit',
                   'action': 'event_edit_form',
@@ -61,8 +60,8 @@
              , description=''
              , effective_date = None 
              , expiration_date = None 
-             , start_date = DateTime() 
-             , end_date = DateTime()
+             , start_date = None 
+             , end_date = None
              , location=''
              , contact_name=''
              , contact_email=''
@@ -110,7 +109,7 @@
 
     # Declarative security
     security = ClassSecurityInfo()
-    security.declareObjectProtected(CMFCorePermissions.View)
+    security.declareObjectProtected(View)
     
     __implements__ = ( PortalContent.__implements__
                      , DefaultDublinCoreImpl.__implements__
@@ -122,8 +121,8 @@
                  , description=''
                  , effective_date = None 
                  , expiration_date = None 
-                 , start_date = DateTime()
-                 , end_date = DateTime()
+                 , start_date = None
+                 , end_date = None
                  , location=''
                  , contact_name=''
                  , contact_email=''
@@ -137,6 +136,11 @@
         self.effective_date = effective_date
         self.expiration_date = expiration_date
         self.setStartDate(start_date)
+
+        if start_date is None:
+            start_date = DateTime()
+        if end_date is None:
+            end_date = start_date
         
         if end_date < start_date:
             end_date = start_date
@@ -318,7 +322,7 @@
         return self.end().AMPMMinutes() 
 
     security.declarePrivate('handleText')
-    def handleText(self, text, format=None, stx_level=None):
+    def handleText(self, text, format=None):
         """ Handles the raw text, returning headers, body, cooked, format """
         headers = {}
         if format == 'html':