X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrefreshLinks.php;h=facc5064c1bb18d1a4e59dd945b079a459e24d15;hb=cc0d030a96f9635a7da24cd3e6c42177a3bd100d;hp=06fcbaf06bdbc2cd4aa003ef6359acdf6d5e5cdb;hpb=144a683e94d791aeba006d7fa301b8e3c12428d0;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 06fcbaf06b..facc5064c1 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use Wikimedia\Rdbms\IDatabase; + require_once __DIR__ . '/Maintenance.php'; /** @@ -176,7 +178,6 @@ class RefreshLinks extends Maintenance { $this->output( "Starting from page_id $start of $end.\n" ); for ( $id = $start; $id <= $end; $id++ ) { - if ( !( $id % self::REPORTING_INTERVAL ) ) { $this->output( "$id\n" ); wfWaitForSlaves(); @@ -189,7 +190,6 @@ class RefreshLinks extends Maintenance { $this->output( "Starting from page_id $start of $end.\n" ); for ( $id = $start; $id <= $end; $id++ ) { - if ( !( $id % self::REPORTING_INTERVAL ) ) { $this->output( "$id\n" ); wfWaitForSlaves(); @@ -276,6 +276,7 @@ class RefreshLinks extends Maintenance { $page->getTitle(), /* $old = */ null, /* $recursive = */ false ); foreach ( $updates as $update ) { DeferredUpdates::addUpdate( $update ); + DeferredUpdates::doUpdates(); } } @@ -388,7 +389,7 @@ class RefreshLinks extends Maintenance { * By specifying a null $start or $end, it is also possible to create * half-bounded or unbounded intervals using this function. * - * @param IDatabase $db Database connection + * @param IDatabase $db * @param string $var Field name * @param mixed $start First value to include or null * @param mixed $end Last value to include or null