Index: branches/unlabeled/unlabeled-1.32.2/kernel/units/general/cat_dbitem.php =================================================================== diff -u -r5869 -r5872 --- branches/unlabeled/unlabeled-1.32.2/kernel/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 5869) +++ branches/unlabeled/unlabeled-1.32.2/kernel/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 5872) @@ -416,20 +416,22 @@ function ApproveChanges() { $original_id = $this->GetDBField('OrgId'); - + if (!($this->usePendingEditing && $original_id)) { // non-pending copy of original link return $this->ChangeStatus(STATUS_ACTIVE); } - $this->raiseEvent('OnBeforeDeleteOriginal', null, Array('original_id' => $original_id)); + if ($this->raiseEvent('OnBeforeDeleteOriginal', null, Array('original_id' => $original_id))) { + // delete original item, because changes made in pending copy (this item) got to be approved in this method + $temp_handler =& $this->Application->recallObject($this->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); + $temp_handler->DeleteItems($this->Prefix, $this->Special, Array($original_id)); + + $this->SetDBField('OrgId', 0); + return $this->ChangeStatus(STATUS_ACTIVE); + } - // delete original item, because changes made in pending copy (this item) got to be approved in this method - $temp_handler =& $this->Application->recallObject($this->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); - $temp_handler->DeleteItems($this->Prefix, $this->Special, Array($original_id)); - - $this->SetDBField('OrgId', 0); - return $this->ChangeStatus(STATUS_ACTIVE); + return false; } /**