X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrefreshLinks.php;h=8306243c082ecadafc49e6a77dc97a13f692fb74;hb=51602a436c723fe8ccf353d5fe5940aec857935f;hp=9ca4e986c8a7b817167d46355fc1aeb6dda859d7;hpb=cd5a34611af3d755ce2bd2793fc22ecceef9568c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 9ca4e986c8..8306243c08 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -268,17 +268,14 @@ class RefreshLinks extends Maintenance { return; } - $content = $page->getContent( Revision::RAW ); - if ( $content === null ) { - return; - } - - $updates = $content->getSecondaryDataUpdates( - $page->getTitle(), /* $old = */ null, /* $recursive = */ false ); - foreach ( $updates as $update ) { - DeferredUpdates::addUpdate( $update ); - DeferredUpdates::doUpdates(); - } + // Defer updates to post-send but then immediately execute deferred updates; + // this is the simplest way to run all updates immediately (including updates + // scheduled by other updates). + $page->doSecondaryDataUpdates( [ + 'defer' => DeferredUpdates::POSTSEND, + 'recursive' => false, + ] ); + DeferredUpdates::doUpdates(); } /**