[Zope3-checkins] CVS: Zope3/src/zope/app/event - globalservice.py:1.3

Steve Alexander steve@cat-box.net
Mon, 27 Jan 2003 13:39:51 -0500


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

Modified Files:
	globalservice.py 
Log Message:
My changes broke things in tests all over, so I've put back the old
behaviour until I've cleaned everything else up.



=== Zope3/src/zope/app/event/globalservice.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/event/globalservice.py:1.2	Mon Jan 27 13:16:20 2003
+++ Zope3/src/zope/app/event/globalservice.py	Mon Jan 27 13:39:48 2003
@@ -235,7 +235,15 @@
         for subscriber, filter in subscriptions:
             if filter is not None and not filter(event):
                 continue
-            getAdapter(subscriber, ISubscriber).notify(event)
+            # getAdapter(subscriber, ISubscriber).notify(event)
+            # XXX This has affected more than it should have done.
+            #     I'll put the proper code back when I've cleaned everything
+            #     up.
+            adapter = queryAdapter(subscriber, ISubscriber)
+            if adapter is not None:
+               adapter.notify(event)
+            else:
+               subscriber.notify(event)
 
 
 class GlobalEventChannel(GlobalSubscribable):