Skip to content
Permalink
Browse files

Revert "Fixed EZP-20558 - Workflow Event/Approve not working correctly"

This reverts commit c2992a1.

Replaced by the fix for http://jira.ez.no/browse/EZP-21599.
  • Loading branch information...
bdunogier committed Sep 24, 2013
1 parent c35a0e3 commit d355026740f39039e44e909544464c1a1fead233
Showing with 0 additions and 14 deletions.
  1. +0 −14 kernel/content/edit.php
@@ -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:

0 comments on commit d355026

Please sign in to comment.
You can’t perform that action at this time.