Skip to content

Commit

Permalink
Revert "Fixed EZP-20558 - Workflow Event/Approve not working correctly"
Browse files Browse the repository at this point in the history
This reverts commit c2992a1.

Replaced by the fix for http://jira.ez.no/browse/EZP-21599.
  • Loading branch information
Bertrand Dunogier committed Sep 30, 2013
1 parent c35a0e3 commit d355026
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions kernel/content/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,33 +729,19 @@ function computeRedirect( $module, $object, $version, $EditLanguage = false )

eZDebug::accumulatorStart( 'publish', '', 'publish' );
$oldObjectName = $object->name();
$db = eZDB::instance();

$behaviour = new ezpContentPublishingBehaviour();
$behaviour->isTemporary = true;
$behaviour->disableAsynchronousPublishing = false;
ezpContentPublishingBehaviour::setBehaviour( $behaviour );

// Getting the current transaction counter to check if all transactions are committed during content/publish operation (see below)
$transactionCounter = $db->transactionCounter();
$operationResult = eZOperationHandler::execute( 'content', 'publish', array( 'object_id' => $object->attribute( 'id' ),
'version' => $version->attribute( 'version' ) ) );
eZDebug::accumulatorStop( 'publish' );

if ( ( array_key_exists( 'status', $operationResult ) && $operationResult['status'] != eZModuleOperationInfo::STATUS_CONTINUE ) )
{
eZDebug::writeDebug( $operationResult, __FILE__ );

// Check if publication related transaction counter is clean.
// If not, operation is probably in STATUS_CANCELLED, STATUS_HALTED, STATUS_REPEAT or STATUS_QUEUED
// and final commit was not done as it's part of the operation body (see commit-transaction action in content/publish operation definition).
// Important note: Will only be committed transactions that weren't closed during the content/publish operation
$transactionDiff = $db->transactionCounter() - $transactionCounter;
for ( $i = 0; $i < $transactionDiff; ++$i )
{
$db->commit();
}

switch( $operationResult['status'] )
{
case eZModuleOperationInfo::STATUS_REPEAT:
Expand Down

0 comments on commit d355026

Please sign in to comment.