Skip to content

Commit

Permalink
fix bug in 'co delete', go with the default co delete behaviour which…
Browse files Browse the repository at this point in the history
… removes the subtree, too
  • Loading branch information
ReaderBound Dev committed Feb 12, 2019
1 parent 1be0eed commit 5d5d6a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/contentobject/index.php
Expand Up @@ -317,7 +317,9 @@ private function delete( $objectId )
{
$adminUserObject = eZUser::fetch( eepSetting::PrivilegedAccountId );
$adminUserObject->loginCurrent();
$result = eZContentObjectOperations::remove( $objectId, false ); // false to indicate, 'dont bother removing subtrees, just purge() it'
// the default behaviour is to delete the subtree,
// FYI, purge(), the non-default behaviour, leaves all the children in place, but up 1 level, and does not update their node-paths ... that is, it corrupts the content structure
$result = eZContentObjectOperations::remove( $objectId );
$adminUserObject->logoutCurrent();
if( $result )
{
Expand Down

0 comments on commit 5d5d6a4

Please sign in to comment.