X-Git-Url: https://scm.cri.mines-paristech.fr/git/MosaicDocument.git/blobdiff_plain/274c2e82bb5e308dcd5ca84e4358fcf1933267c0..239d4f4fa94ff7f946206958329bf31ebc3f05a1:/MosaicBlockInformation.py?ds=inline diff --git a/MosaicBlockInformation.py b/MosaicBlockInformation.py index 1ff5c3a..444c791 100755 --- a/MosaicBlockInformation.py +++ b/MosaicBlockInformation.py @@ -25,6 +25,7 @@ from Globals import InitializeClass, DTMLFile from Products.CMFCore.TypesTool import FactoryTypeInformation from Products.CMFCore.utils import getToolByName from types import InstanceType +import config from AccessControl import ClassSecurityInfo, Unauthorized from Products.CMFCore.permissions import View, ModifyPortalContent, \ @@ -42,9 +43,8 @@ addMosaicBlockInformationForm = DTMLFile('dtml/addMosaicBlockForm', globals()) def addMosaicBlockInformation(self, id=None, blockType = '', metaFti = None, REQUEST=None) : """Add a MosaicBlock""" - mosaicTool = self.mosaic_tool if blockType : - metaFtis = mosaicTool.getDefaultBlockMetaFtis() + metaFtis = config.getDefaultBlockMetaFtis() if not metaFtis.has_key(blockType) : raise ValueError, "Unknown block type : %s" % blockType else :