Commit ba85bd28 authored by Yusei Tahara's avatar Yusei Tahara

Use portal_contribution_registry instead of content_type_registry.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20591 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1253bc5
......@@ -212,8 +212,9 @@ class ContributionTool(BaseTool):
# Check if same file is already exists. if it exists, then update it.
#
if portal_type is None:
content_type_registry = getToolByName(self, 'content_type_registry')
portal_type = content_type_registry.findTypeName(file_name, None, None)
registry = getToolByName(self, 'portal_contribution_registry', None)
if registry is not None:
portal_type = registry.findPortalTypeName(file_name, None, None)
property_dict = self.getMatchedFileNamePatternDict(file_name)
reference = property_dict.get('reference', None)
version = property_dict.get('version', None)
......@@ -360,10 +361,8 @@ class ContributionTool(BaseTool):
(as long as the one we find is compatible) and move the
document to the appropriate module.
content_type_registry must be set up so that an appropriate
portal_type with appropriate meta_type is found for every
kind of document. However, a different portal_type might
be used in the end.
portal_contribution_registry will find appropriate portal type
name by file_name and content itself.
The ContributionTool instance must be configured in such
way that _verifyObjectPaste will return TRUE.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment