[Zope3-checkins] CVS: Zope3/src/zope/app/dav - adapter.py:1.9
mkcol.py:1.5 propfind.py:1.17
Jim Fulton
jim at zope.com
Sat Mar 6 12:49:20 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/dav
In directory cvs.zope.org:/tmp/cvs-serv21993/src/zope/app/dav
Modified Files:
adapter.py mkcol.py propfind.py
Log Message:
Changed most calls to queryAdapter to use interface calls instead.
=== Zope3/src/zope/app/dav/adapter.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/dav/adapter.py:1.8 Sat Mar 6 11:50:20 2004
+++ Zope3/src/zope/app/dav/adapter.py Sat Mar 6 12:48:48 2004
@@ -17,7 +17,6 @@
"""
from xml.dom import minidom
-from zope.component import queryAdapter
from zope.interface import implements
from zope.app import zapi
@@ -36,7 +35,7 @@
def displayname(self):
value = zapi.name(self.context)
- if queryAdapter(self.context, IReadDirectory, None) is not None:
+ if IReadDirectory(self.context, None) is not None:
value = value + '/'
return value
@@ -48,7 +47,7 @@
return value
def resourcetype(self):
- value = queryAdapter(self.context, IReadDirectory, None)
+ value = IReadDirectory(self.context, None)
xml = minidom.Document()
if value is not None:
node = xml.createElement('collection')
=== Zope3/src/zope/app/dav/mkcol.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/dav/mkcol.py:1.4 Sat Mar 6 11:50:20 2004
+++ Zope3/src/zope/app/dav/mkcol.py Sat Mar 6 12:48:48 2004
@@ -39,7 +39,7 @@
container = self.context.container
name = self.context.name
- dir = zapi.queryAdapter(container, IWriteDirectory, None)
+ dir = IWriteDirectory(container, None)
if dir is None:
request.response.setStatus(403)
return ''
=== Zope3/src/zope/app/dav/propfind.py 1.16 => 1.17 ===
--- Zope3/src/zope/app/dav/propfind.py:1.16 Fri Mar 5 23:17:22 2004
+++ Zope3/src/zope/app/dav/propfind.py Sat Mar 6 12:48:48 2004
@@ -105,7 +105,7 @@
count += 1
prop.setAttribute('xmlns:%s' % attr_name, ns)
iface = _props[ns]['iface']
- adapter = zapi.queryAdapter(self.context, iface, None)
+ adapter = iface(self.context, None)
initial = {}
for name in avail.get(ns):
attr = getattr(adapter, name, None)
@@ -235,7 +235,7 @@
l.append(p)
not_avail[ns] = l
continue
- adapter = zapi.queryAdapter(self.context, iface, None)
+ adapter = iface(self.context, None)
if adapter is None:
l = not_avail.get(ns, [])
l.append(p)
More information about the Zope3-Checkins
mailing list