Logo Search packages:      
Sourcecode: zope-cmfmember version File versions  Download package

def CMFMember::tools::control::ControlTool::getMemberTypesFileSystemVersion (   self  ) 

The version this instance of Plone is on 

Definition at line 272 of file control.py.

00272                                              :
        """ The version this instance of Plone is on """
        portal = getToolByName(self, 'portal_url')
        memberdata_tool = portal.portal_memberdata
        vars = {}
        tempFolder = PortalFolder('temp').__of__(self)
        # don't store tempFolder in the catalog
        tempFolder.unindexObject()

        # get information from old MemberDataTool
        if hasattr(memberdata_tool.__class__, 'portal_type') \
           and memberdata_tool.__class__.portal_type == 'CMFMember Tool':
            member_type = memberdata_tool.typeName
            getMemberFactory(tempFolder, member_type)(member_type)
            memberInstance = getattr(tempFolder,member_type)
            getattr(tempFolder,member_type).unindexObject()
            # don't store memberInstance in the catalog
            vars[member_type] = memberInstance.version.lower()
            memberInstance.unindexObject()
        elif memberdata_tool.__class__ == CMFMember.tools.memberdatacontainer.MemberDataContainer:
            for member_type in memberdata_tool.getAllowedMemberTypes():
                getMemberFactory(tempFolder, member_type)(member_type)
                memberInstance = getattr(tempFolder,member_type)
                getattr(tempFolder,member_type).unindexObject()
                # don't store memberInstance in the catalog
                vars[member_type] = memberInstance.version.lower()
                memberInstance.unindexObject() 
        return vars.items()
    
    security.declareProtected(ManagePortal, 'needUpgrading')
    def needUpgrading(self):


Generated by  Doxygen 1.6.0   Back to index