[ZPT] CVS: Zope/lib/python/ZTUtils - Zope.py:1.4.8.1
Andreas Jung
andreas@zope.com
Wed, 7 Nov 2001 11:11:30 -0500
Update of /cvs-repository/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv12548/lib/python/ZTUtils
Modified Files:
Tag: ajung-webdav-debug
Zope.py
Log Message:
merge from trunk
=== Zope/lib/python/ZTUtils/Zope.py 1.4 => 1.4.8.1 ===
class SimpleTreeMaker(TreeSkipMixin, SimpleTreeMaker):
_getChildren = SimpleTreeMaker.getChildren
- def cookieTree(self, root_object):
+ def cookieTree(self, root_object, default_state=None):
'''Make a tree with state stored in a cookie.'''
tree_pre = self.tree_pre
state_name = '%s-state' % tree_pre
@@ -202,6 +202,8 @@
del m[obid]
else:
state = decodeExpansion(state)
+ else:
+ state = default_state
tree = self.tree(root_object, state)
rows = tree.flat()
req.RESPONSE.setCookie(state_name, encodeExpansion(rows))