summaryrefslogtreecommitdiff
path: root/maintenance/refreshLinks.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/refreshLinks.php')
-rw-r--r--maintenance/refreshLinks.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index a2484aa3..06e1449e 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -73,7 +73,7 @@ class RefreshLinks extends Maintenance {
private function doRefreshLinks( $start, $newOnly = false,
$end = null, $redirectsOnly = false, $oldRedirectsOnly = false
) {
- global $wgParser, $wgUseTidy;
+ global $wgParser;
$reportingInterval = 100;
$dbr = wfGetDB( DB_SLAVE );
@@ -83,14 +83,11 @@ class RefreshLinks extends Maintenance {
}
// Give extensions a chance to optimize settings
- wfRunHooks( 'MaintenanceRefreshLinksInit', array( $this ) );
+ Hooks::run( 'MaintenanceRefreshLinksInit', array( $this ) );
# Don't generate extension images (e.g. Timeline)
$wgParser->clearTagHooks();
- # Don't use HTML tidy
- $wgUseTidy = false;
-
$what = $redirectsOnly ? "redirects" : "links";
if ( $oldRedirectsOnly ) {
@@ -344,17 +341,15 @@ class RefreshLinks extends Maintenance {
$numIds = count( $ids );
if ( $numIds ) {
$counter += $numIds;
- wfWaitForSlaves();
$dbw->delete( $table, array( $field => $ids ), __METHOD__ );
$this->output( ", $counter" );
$tableStart = $ids[$numIds - 1] + 1;
+ wfWaitForSlaves();
}
} while ( $numIds >= $batchSize && ( $end === null || $tableStart <= $end ) );
$this->output( " deleted.\n" );
-
- wfWaitForSlaves();
}
}