[Zope3-checkins] CVS: Zope3/src/zope/app/dav - adapter.py:1.8
mkcol.py:1.4
Jim Fulton
jim at zope.com
Sat Mar 6 11:50:50 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/dav
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/dav
Modified Files:
adapter.py mkcol.py
Log Message:
Converted most getAdapter calls to use interface calls instead.
=== Zope3/src/zope/app/dav/adapter.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/dav/adapter.py:1.7 Wed Mar 3 12:06:30 2004
+++ Zope3/src/zope/app/dav/adapter.py Sat Mar 6 11:50:20 2004
@@ -17,7 +17,7 @@
"""
from xml.dom import minidom
-from zope.component import getAdapter, queryAdapter
+from zope.component import queryAdapter
from zope.interface import implements
from zope.app import zapi
@@ -41,7 +41,7 @@
return value
def creationdate(self):
- value = getAdapter(self.context, IDCTimes).created
+ value = IDCTimes(self.context).created
if value is None:
return ''
value = value.strftime('%Y-%m-%d %TZ')
@@ -56,11 +56,11 @@
return ''
def getcontentlength(self):
- value = getAdapter(self.context, ISized).sizeForDisplay()
+ value = ISized(self.context).sizeForDisplay()
return str(value)
def getlastmodified(self):
- value = getAdapter(self.context, IDCTimes).modified
+ value = IDCTimes(self.context).modified
if value is None:
return ''
value = value.strftime('%a, %d %b %Y %H:%M:%S GMT')
=== Zope3/src/zope/app/dav/mkcol.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/dav/mkcol.py:1.3 Wed Mar 3 12:06:30 2004
+++ Zope3/src/zope/app/dav/mkcol.py Sat Mar 6 11:50:20 2004
@@ -44,7 +44,7 @@
request.response.setStatus(403)
return ''
- factory = zapi.getAdapter(container, IDirectoryFactory)
+ factory = IDirectoryFactory(container)
newdir = factory(name)
publish(self.context, ObjectCreatedEvent(newdir))
dir[name] = newdir
More information about the Zope3-Checkins
mailing list