[CMF-checkins] CVS: CMF/CMFSetup - typeinfo.py:1.8.2.2

Yvo Schubbe y.2004_ at wcm-solutions.de
Mon Jul 19 13:56:47 EDT 2004


Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv7655/CMFSetup

Modified Files:
      Tag: yuppie-actions-cleanup-branch
	typeinfo.py 
Log Message:
- replaced 'allowed_content_types' attribute by 'allowed_content_type' elements


=== CMF/CMFSetup/typeinfo.py 1.8.2.1 => 1.8.2.2 ===
--- CMF/CMFSetup/typeinfo.py:1.8.2.1	Sun Jul 18 18:20:44 2004
+++ CMF/CMFSetup/typeinfo.py	Mon Jul 19 13:56:17 2004
@@ -282,7 +282,7 @@
     immediate_view        = _qs('immediate_view', '%s_edit' % type_id)
     global_allow          = _qb('global_allow', True)
     filter_content_types  = _qb('filter_content_types', False)
-    allowed_content_types = _extractAllowedContentTypesNode(ti_node, encoding)
+    allowed_content_types = _extractAllowedContentTypeNodes(ti_node, encoding)
     allow_discussion      = _qb('allow_discussion', False)
     aliases               = _extractAliasesNode(ti_node, encoding)
     actions               = _extractActionNodes(ti_node, encoding)
@@ -312,10 +312,15 @@
 
     return result
 
-def _extractAllowedContentTypesNode(parent, encoding=None):
+def _extractAllowedContentTypeNodes(parent, encoding=None):
 
-    act = _queryNodeAttribute(parent, 'allowed_content_types', '', encoding)
-    return act.split(',')
+    result = []
+
+    for act_node in parent.getElementsByTagName('allowed_content_type'):
+        value = _coalesceTextNodeChildren(act_node, encoding)
+        result.append(value)
+
+    return tuple(result)
 
 def _extractDescriptionNode(parent, encoding=None):
 



More information about the CMF-checkins mailing list