[CMF-checkins] CVS: CMF/CMFDefault - MembershipTool.py:1.19.10.1 SyndicationTool.py:1.11.10.1

Shane Hathaway shane@cvs.zope.org
Wed, 20 Feb 2002 15:15:23 -0500


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv27999/CMFDefault

Modified Files:
      Tag: cmf-pre-1_3-branch
	MembershipTool.py SyndicationTool.py 
Log Message:
Merged changes from head, with a small change: the types tool does not need
to be extended in such a complex way.  I took out the type_type registry and
the __bobo_traverse__ hook and replaced it with the original code with only
minor mods that give you the same extensibility without all the hacking.
(If anyone actually wants to use the extensibility, which I suspect no one
is actually interested in doing, I will happily provide instructions and
will create a corrected unit test.)


=== CMF/CMFDefault/MembershipTool.py 1.19 => 1.19.10.1 ===
                              )
           , ActionInformation(id='mystuff'
-                            , title='my stuff'
+                            , title='My stuff'
                             , description='Goto your home folder'
                             , action=Expression(
-          text='python: portal.portal_membership.getHomeUrl()')
+          text='python: portal.portal_membership.getHomeUrl()+"/folder_contents"')
                             , permissions=(View,)
                             , category='user'
                             , condition=Expression(


=== CMF/CMFDefault/SyndicationTool.py 1.11 => 1.11.10.1 ===
         if not self.isSiteSyndicationAllowed():
             raise 'Syndication is Not Allowed'
+        if obj is None:
+            return self.syUpdatePeriod
         else:
             syInfo = getattr(obj, 'syndication_information',
                              None)
             if syInfo is not None:
                 return syInfo.syUpdatePeriod
             else:
-                #return self.syUpdatePeriod
                 return 'Syndication is Not Allowed'
     
     security.declarePublic('getUpdateFrequency')
@@ -274,6 +275,8 @@
         """
         if not self.isSiteSyndicationAllowed():
             raise 'Syndication is not Allowed'
+        if obj is None:
+            return self.syUpdateFrequency
         else:
             syInfo = getattr(obj, 'syndication_information',
                              None)
@@ -298,6 +301,9 @@
         #import pdb; pdb.set_trace()
         if not self.isSiteSyndicationAllowed():
             raise 'Syndication is not Allowed'
+        if obj is None:
+            when = self.syUpdateBase
+            return when.ISO()
         else:
             syInfo = getattr(obj, 'syndication_information',
                                None)
@@ -314,6 +320,9 @@
         """
         if not self.isSiteSyndicationAllowed():
             raise 'Syndication is not Allowed'
+        if obj is None:
+            when = syUpdateBase
+            return when.HTML4()
         else:
             syInfo = getattr(obj, 'syndication_information',
                                 None)
@@ -329,6 +338,8 @@
         """
         if not self.isSiteSyndicationAllowed():
             raise 'Syndication is not Allowed'
+        if obj is None:
+            return self.max_items
         else:
             syInfo = getattr(obj, 'syndication_information',
                                 None)