[CMF-checkins] CVS: Products/CMFDefault - DublinCore.py:1.27.2.2
Tres Seaver
tseaver at zope.com
Sun Aug 1 16:51:41 EDT 2004
Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv16902/CMFDefault
Modified Files:
Tag: CMF-1_4-branch
DublinCore.py
Log Message:
- Use the 'portal_metadata' tool's 'getPublisher' for the DublinCore
'Publisher' element (thanks to Eric Brown for the patch).
=== Products/CMFDefault/DublinCore.py 1.27.2.1 => 1.27.2.2 ===
--- Products/CMFDefault/DublinCore.py:1.27.2.1 Thu Apr 22 13:47:50 2004
+++ Products/CMFDefault/DublinCore.py Sun Aug 1 16:51:11 2004
@@ -19,6 +19,7 @@
from Products.CMFCore.interfaces.DublinCore import DublinCore
from Products.CMFCore.interfaces.DublinCore import CatalogableDublinCore
from Products.CMFCore.interfaces.DublinCore import MutableDublinCore
+from Products.CMFCore.utils import getToolByName
from utils import tuplize, _dtmldir, semi_split
from Globals import InitializeClass, DTMLFile
@@ -115,7 +116,11 @@
security.declarePublic( 'Publisher' )
def Publisher( self ):
"Dublin Core element - resource publisher"
- # XXX: fixme using 'portal_metadata'
+ portal_metadata = getToolByName( self,'portal_metadata', None )
+
+ if portal_metadata is not None:
+ return portal_metadata.getPublisher()
+
return 'No publisher'
security.declarePublic( 'Description' )
More information about the CMF-checkins
mailing list