def _notifyOfCopyTo(self, container, op=0): """In the case of a move (op=1) we need to make sure references are mainained for all referencable objects within the one being moved. manage_renameObject calls _notifyOfCopyTo so that the object being renamed doesn't lose its references. But manage_renameObject calls _delObject which calls manage_beforeDelete on all the children of the object being renamed which deletes all references for children of the object being renamed. Here is a patch that does recursive calls for _notifyOfCopyTo to address that problem. """ # XXX this doesn't appear to be necessary anymore, if it is # it needs to be used in BaseBTreeFolder as well, it currently # is not. BaseObject._notifyOfCopyTo(self, container, op=op) # keep reference info internally when op == 1 (move) # because in those cases we need to keep refs if op == 1: self._v_cp_refs = 1 for child in self.contentValues(): if IReferenceable.providedBy(child): child._notifyOfCopyTo(self, op)
def _notifyOfCopyTo(self, container, op=0): # OFS.CopySupport notify BaseObject._notifyOfCopyTo(self, container, op=op) # keep reference info internally when op == 1 (move) # because in those cases we need to keep refs if op == 1: self._v_cp_refs = 1
def _notifyOfCopyTo(self, container, op=0): """In the case of a move (op=1) we need to make sure references are mainained for all referencable objects within the one being moved. manage_renameObject calls _notifyOfCopyTo so that the object being renamed doesn't lose its references. But manage_renameObject calls _delObject which calls manage_beforeDelete on all the children of the object being renamed which deletes all references for children of the object being renamed. Here is a patch that does recursive calls for _notifyOfCopyTo to address that problem. """ # XXX this doesn't appear to be necessary anymore, if it is # it needs to be used in BaseBTreeFolder as well, it currently # is not. BaseObject._notifyOfCopyTo(self, container, op=op) # keep reference info internally when op == 1 (move) # because in those cases we need to keep refs if op==1: self._v_cp_refs = 1 for child in self.contentValues(): if IReferenceable.providedBy(child): child._notifyOfCopyTo(self, op)
def _notifyOfCopyTo(self, container, op=0): # OFS.CopySupport notify BaseObject._notifyOfCopyTo(self, container, op=op) # keep reference info internally when op == 1 (move) # because in those cases we need to keep refs if op == 1: self._v_cp_refs = 1
def _notifyOfCopyTo(self, container, op=0): """OFS.CopySupport notify """ BaseObject._notifyOfCopyTo(self, container, op=op) PortalContent._notifyOfCopyTo(self, container, op=op)