Bug with recursing into opaque items (__recurse in CMFCatalogAware) was: [Zope-CMF] Bug with CMFUid content when copied indirectly and some confusion.

Dieter Maurer dieter at handshake.de
Tue Aug 31 15:58:57 EDT 2004


Gregoire Weber wrote at 2004-8-25 16:45 +0200:
> ...
>>         args = [self, args[0]][:len(args)]
>>         for ob in opaque_values:
>>             s = getattr(ob, '_p_changed', 0)
>>             if hasattr(aq_base(ob), name):
>>                 getattr(ob, name)(*args)

This patch looks wrong:

  "item" and "container" specify the top level "item" added/deleted
  and its container.

  This means, they must not change in the recursive call.

  This is essential, e.g., to recognize whether the copy/move
  it within a given context (e.g. a CMF site).

We use this, e.g., to allow for an efficient move/rename of
complete CMF sites (we use CMF site relative paths rather
than physical paths for cataloguing; this implies that
nothing needs to be done when a complete CMF site is moved/renamed/copied).

-- 
Dieter


More information about the Zope-CMF mailing list