[Zope3-checkins] CVS: Zope3/src/zope/app/dav - adapter.py:1.3

Steve Alexander steve@cat-box.net
Fri, 13 Jun 2003 13:41:48 -0400


Update of /cvs-repository/Zope3/src/zope/app/dav
In directory cvs.zope.org:/tmp/cvs-serv28622/src/zope/app/dav

Modified Files:
	adapter.py 
Log Message:
Removed the @@object_name view, as used in some page templates, and
the ObjectName view and adapter also.
Extended IPhysicallyLocatable with a getName method.
Renamed the convenience function objectName to getName.

If you have page templates that use @@object_name, then you can replace it
with zope:name.



=== Zope3/src/zope/app/dav/adapter.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/dav/adapter.py:1.2	Tue Jun  3 18:46:19 2003
+++ Zope3/src/zope/app/dav/adapter.py	Fri Jun 13 13:41:16 2003
@@ -18,10 +18,10 @@
 
 from xml.dom import minidom
 from zope.component import getAdapter, queryAdapter
-from zope.app.interfaces.traversing import IObjectName
 from zope.app.interfaces.dublincore import IDCTimes
 from zope.app.interfaces.file import IReadDirectory
 from zope.app.interfaces.size import ISized
+from zope.app import zapi
 
 class DAVSchemaAdapter:
 
@@ -29,8 +29,7 @@
         self.context = object
 
     def displayname(self):
-        value = getAdapter(self.context, IObjectName)()
-        return value
+        return zapi.name(self.context)
 
     def creationdate(self):
         value = getAdapter(self.context, IDCTimes).created