Merge "Fix edit link for messages in $wgForceUIMsgAsContentMsg"
[lhc/web/wiklou.git] / includes / revisiondelete / RevDelList.php
index 840fd77..7a3ddfe 100644 (file)
@@ -92,7 +92,9 @@ abstract class RevDelList extends RevisionListBase {
                $this->res = false;
                $dbw = wfGetDB( DB_MASTER );
                $this->doQuery( $dbw );
-               $dbw->begin( __METHOD__ );
+
+               $dbw->startAtomic( __METHOD__ );
+
                $status = Status::newGood();
                $missing = array_flip( $this->ids );
                $this->clearFileOps();
@@ -207,10 +209,15 @@ abstract class RevDelList extends RevisionListBase {
                        'authorIds' => $authorIds,
                        'authorIPs' => $authorIPs
                ) );
-               $dbw->commit( __METHOD__ );
 
                // Clear caches
-               $status->merge( $this->doPostCommitUpdates() );
+               $that = $this;
+               $dbw->onTransactionIdle( function() use ( $that ) {
+                       $that->doPostCommitUpdates();
+               } );
+
+               $dbw->endAtomic( __METHOD__ );
+
                return $status;
        }