[ZPT] CVS: Zope/lib/python/ZTUtils - Tree.py:1.4.14.4 Zope.py:1.7.14.2

Martijn Pieters mj@zope.com
Mon, 7 Oct 2002 15:45:32 -0400


Update of /cvs-repository/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv2048/lib/python/ZTUtils

Modified Files:
      Tag: Zope-2_5-branch
	Tree.py Zope.py 
Log Message:
Merge skipping of unauthorized tree objects during child object filtering 
from the trunk.


=== Zope/lib/python/ZTUtils/Tree.py 1.4.14.3 => 1.4.14.4 ===
--- Zope/lib/python/ZTUtils/Tree.py:1.4.14.3	Fri Oct  4 22:10:44 2002
+++ Zope/lib/python/ZTUtils/Tree.py	Mon Oct  7 15:45:32 2002
@@ -139,6 +139,9 @@
             # Assume callable; result not useful anyway otherwise.
             children = children()
 
+        return self.filterChildren(children)
+
+    def filterChildren(self, children):
         if self._values_filter:
             return self._values_filter(children)
         return children


=== Zope/lib/python/ZTUtils/Zope.py 1.7.14.1 => 1.7.14.2 ===
--- Zope/lib/python/ZTUtils/Zope.py:1.7.14.1	Fri Feb 15 11:26:21 2002
+++ Zope/lib/python/ZTUtils/Zope.py	Mon Oct  7 15:45:32 2002
@@ -100,6 +100,9 @@
         return self
     def getChildren(self, object):
         return LazyFilter(self._getChildren(object), skip=self.skip)
+    def filterChildren(self, children):
+        if self._values_filter:
+            return self._values_filter(LazyFilter(children, skip=self.skip))
 
 class TreeMaker(TreeSkipMixin, TreeMaker):
     _getChildren = TreeMaker.getChildren