Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EZP-25416: Content Object Copy: db->commit called after content/publish #1235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kernel/content/copy.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ function copyObject( $Module, $object, $allVersions, $newParentNodeID )
) );
$nodeAssignment->store();

$db->commit();

// publish the newly created object
eZOperationHandler::execute( 'content', 'publish', array( 'object_id' => $newObject->attribute( 'id' ),
'version' => $curVersion ) );
// Update "is_invisible" attribute for the newly created node.
$newNode = $newObject->attribute( 'main_node' );
eZContentObjectTreeNode::updateNodeVisibility( $newNode, $newParentNode );

$db->commit();
return $Module->redirectToView( 'view', array( 'full', $newParentNodeID ) );
}

Expand Down