X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FDeferredUpdates.php;h=9b25d53820bbc67d8543fad42cb292ddcd1b4ea8;hb=90232b6f36ee5a1473f2e865cc7a72d0014db4c7;hp=40069f33c0c665a50748bb1aa832d05b102a6b78;hpb=feaf1daca9a0614efd35278e196a0fc18cb381a3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index 40069f33c0..9b25d53820 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -106,10 +106,10 @@ class DeferredUpdates { * * @param callable $callable * @param int $stage DeferredUpdates constant (PRESEND or POSTSEND) (since 1.27) - * @param IDatabase|null $dbw Abort if this DB is rolled back [optional] (since 1.28) + * @param IDatabase|IDatabase[]|null $dbw Abort if this DB is rolled back [optional] (since 1.28) */ public static function addCallableUpdate( - $callable, $stage = self::POSTSEND, IDatabase $dbw = null + $callable, $stage = self::POSTSEND, $dbw = null ) { self::addUpdate( new MWCallableUpdate( $callable, wfGetCaller(), $dbw ), $stage ); } @@ -149,7 +149,7 @@ class DeferredUpdates { if ( $update instanceof MergeableUpdate ) { $class = get_class( $update ); // fully-qualified class if ( isset( $queue[$class] ) ) { - /** @var $existingUpdate MergeableUpdate */ + /** @var MergeableUpdate $existingUpdate */ $existingUpdate = $queue[$class]; $existingUpdate->merge( $update ); } else { @@ -250,6 +250,8 @@ class DeferredUpdates { // Run only the job enqueue logic to complete the update later $spec = $update->getAsJobSpecification(); JobQueueGroup::singleton( $spec['wiki'] )->push( $spec['job'] ); + } elseif ( $update instanceof TransactionRoundDefiningUpdate ) { + $update->doUpdate(); } else { // Run the bulk of the update now $fnameTrxOwner = get_class( $update ) . '::doUpdate';