Skip to content

Commit

Permalink
Fixed EZP-20183: eZ Flow displays wrong date on manual block types fo…
Browse files Browse the repository at this point in the history
…r items still on queue.

Make sure to update block item timestamps when disabling rotation.
  • Loading branch information
Joao Inacio authored and Bertrand Dunogier committed Feb 5, 2013
1 parent f533de9 commit 348ed94
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -539,12 +539,22 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut
$rotationUnit = $http->postVariable( 'RotationUnit_' . $params[2] );
$rotationSuffle = $http->postVariable( 'RotationShuffle_' . $params[2] );

if ( $rotationValue == '' )
if ( trim( $rotationValue ) == '' || $rotationValue == 0 )
{
$block->setAttribute( 'rotation', array( 'interval' => 0,
'type' => 0,
'value' => '',
'unit' => '' ) );
$waitingItems = $block->attribute( 'waiting' );
foreach ( $waitingItems as $item )
{
$item->setAttribute( 'ts_publication', time() );
$item->setAttribute( 'ts_visible', time() );
$item->setAttribute( 'ts_hidden', '0' );
$item->setAttribute( 'action', 'add' );
$item->setXMLStorable( true );
$block->addItem( $item );
}
}
else
{
Expand Down

0 comments on commit 348ed94

Please sign in to comment.