Index: branches/unlabeled/unlabeled-1.73.2/core/kernel/db/db_event_handler.php =================================================================== diff -u -r5870 -r5872 --- branches/unlabeled/unlabeled-1.73.2/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 5870) +++ branches/unlabeled/unlabeled-1.73.2/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 5872) @@ -108,10 +108,10 @@ 'OnProcessSelected' => Array('self' => 'add|edit', 'subitem' => 'add|edit'), 'OnSelectUser' => Array('self' => 'add|edit', 'subitem' => 'add|edit'), - 'OnMassApprove' => Array('self' => 'advanced:approve|add|edit', 'subitem' => 'advanced:approve|add|edit'), - 'OnMassDecline' => Array('self' => 'advanced:decline|add|edit', 'subitem' => 'advanced:decline|add|edit'), - 'OnMassMoveUp' => Array('self' => 'advanced:move_up|add|edit', 'subitem' => 'advanced:move_up|add|edit'), - 'OnMassMoveDown' => Array('self' => 'advanced:move_down|add|edit', 'subitem' => 'advanced:move_down|add|edit'), + 'OnMassApprove' => Array('self' => 'advanced:approve|edit', 'subitem' => 'advanced:approve|add|edit'), + 'OnMassDecline' => Array('self' => 'advanced:decline|edit', 'subitem' => 'advanced:decline|add|edit'), + 'OnMassMoveUp' => Array('self' => 'advanced:move_up|edit', 'subitem' => 'advanced:move_up|add|edit'), + 'OnMassMoveDown' => Array('self' => 'advanced:move_down|edit', 'subitem' => 'advanced:move_down|add|edit'), 'OnPreCreate' => Array('self' => 'add|add.pending'), 'OnEdit' => Array('self' => 'edit|edit.pending'), @@ -123,17 +123,17 @@ 'OnCancelEdit' => Array('self' => 'add|add.pending|edit|edit.pending'), 'OnCancel' => Array('self' => 'add|edit', 'subitem' => 'add|edit'), - 'OnSetSorting' => Array('self' => 'view', 'subitem' => 'view'), - 'OnSetSortingDirect' => Array('self' => 'view', 'subitem' => 'view'), + 'OnSetSorting' => Array('self' => true, 'subitem' => true), + 'OnSetSortingDirect' => Array('self' => true, 'subitem' => true), - 'OnSetFilter' => Array('self' => 'view', 'subitem' => 'view'), - 'OnApplyFilters' => Array('self' => 'view', 'subitem' => 'view'), - 'OnRemoveFilters' => Array('self' => 'view', 'subitem' => 'view'), + 'OnSetFilter' => Array('self' => true, 'subitem' => true), + 'OnApplyFilters' => Array('self' => true, 'subitem' => true), + 'OnRemoveFilters' => Array('self' => true, 'subitem' => true), - 'OnSetPerPage' => Array('self' => 'view', 'subitem' => 'view'), + 'OnSetPerPage' => Array('self' => true, 'subitem' => true), - 'OnSearch' => Array('self' => 'view', 'subitem' => 'view'), - 'OnSearchReset' => Array('self' => 'view', 'subitem' => 'view'), + 'OnSearch' => Array('self' => true, 'subitem' => true), + 'OnSearchReset' => Array('self' => true, 'subitem' => true), 'OnGoBack' => Array('self' => true, 'subitem' => true), ); Index: branches/unlabeled/unlabeled-1.32.2/core/units/general/cat_dbitem.php =================================================================== diff -u -r5869 -r5872 --- branches/unlabeled/unlabeled-1.32.2/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 5869) +++ branches/unlabeled/unlabeled-1.32.2/core/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; } /** 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; } /**