[Zope3-checkins] CVS: Zope3/src/zope/app/browser - onlinehelp.py:1.16 onlinehelp.zcml:1.11

Jim Fulton jim at zope.com
Thu Oct 16 06:16:16 EDT 2003


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

Modified Files:
	onlinehelp.py onlinehelp.zcml 
Log Message:
Removed an insanely expensive and broken view, FindRelevantHelpTopics.
I don't know exactly what this thing was supposed to do, as there
were no comments and there was a meaningless doc string.  It
effectively did nothing, but took a very long time to do it, making
every page render much more slowly than it should.

There were no tests.


=== Zope3/src/zope/app/browser/onlinehelp.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/browser/onlinehelp.py:1.15	Sun Sep 21 13:30:20 2003
+++ Zope3/src/zope/app/browser/onlinehelp.py	Thu Oct 16 06:15:45 2003
@@ -42,36 +42,3 @@
         onlinehelp = getRoot(self.context)
         return self._makeSubTree(onlinehelp)
 
-
-class FindRelevantHelpTopics(BrowserView):
-    """This object is used as a view on a view, so that we can get all the
-    required information."""
-
-    def __call__(self):
-
-        class FindResult:
-            def __init__(self, url, topic):
-                self.url = url
-                self.topic = topic
-
-        view_class = self.context.__class__
-        obj = self.context.context
-        help = getService(obj, 'OnlineHelp')
-        ifaces = providedBy(obj).flattened()
-        topics = []
-        for iface in ifaces:
-            specs = viewService.getRegisteredMatching((iface,),
-                                                      IBrowserPresentation)
-            for spec in specs:
-                if spec[2][0] is not view_class:
-                    continue
-                for topic in help.getTopicsForInterfaceAndView(iface, spec[4]):
-                    parents = getParents(topic)
-                    path = map(getName, [topic]+parents[:-1]) 
-                    path.reverse()
-                    url = getView(obj, 'absolute_url', self.request)()
-                    url += '/++help++/++skin++Onlinehelp/'+'/'.join(path)
-                    topics.append(FindResult(url, topic))
-        
-        return topics
-        


=== Zope3/src/zope/app/browser/onlinehelp.zcml 1.10 => 1.11 ===
--- Zope3/src/zope/app/browser/onlinehelp.zcml:1.10	Sat Aug 23 16:37:35 2003
+++ Zope3/src/zope/app/browser/onlinehelp.zcml	Thu Oct 16 06:15:45 2003
@@ -2,13 +2,6 @@
   xmlns:zope="http://namespaces.zope.org/zope"
   xmlns="http://namespaces.zope.org/browser">
 
-  <page
-      name="find_help_topics"
-      for="*"
-      class=".onlinehelp.FindRelevantHelpTopics"
-      permission="zope.Public"
-      allowed_attributes="__call__" />
-
   <pages
       for="zope.app.interfaces.onlinehelp.IOnlineHelpTopic"
       permission="zope.Public"




More information about the Zope3-Checkins mailing list