ezsystems/ezpublish-legacy — pull request #844 by guillaumelecerf (2013-12-03 09:49:22+00:00)
Title: Fix EZP-16372: deleting of content lasts very long

The prototypes of removeObject() and removeObjectById() differ between eZSearch and eZFind, i.e:

static function removeObject( $contentObject, $commit = true )
versus
function removeObject( $contentObject, $commit = null )

When eZContentObject calls eZSearch::removeObjectById( $delID ), removeObjectById() is called by eZSearch with its default value, $commit = true.

So the check :
if ( !isset( $commit ) && ( $this->FindINI->variable( 'IndexOptions', 'DisableDeleteCommits' ) === 'true' ) )

is always false, because $commit is always defined.

So unify the prototypes between them, setting $commit default value to null.