bug: 56776
Change-Id: Ic75530b25f3fa5668019c76ce59a1dda2768f389
$logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
$logid = $logEntry->insert();
$logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
$logid = $logEntry->insert();
- $logEntry->publish( $logid );
+
+ $dbw->onTransactionPreCommitOrIdle( function() use ( $dbw, $logEntry, $logid ) {
+ // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
+ $logEntry->publish( $logid );
+ } );
if ( $commit ) {
$dbw->commit( __METHOD__ );
if ( $commit ) {
$dbw->commit( __METHOD__ );