summaryrefslogtreecommitdiff
path: root/maintenance/refreshLinks.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-12-17 09:15:42 +0100
committerPierre Schmitz <pierre@archlinux.de>2015-12-17 09:44:51 +0100
commita1789ddde42033f1b05cc4929491214ee6e79383 (patch)
tree63615735c4ddffaaabf2428946bb26f90899f7bf /maintenance/refreshLinks.php
parent9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff)
Update to MediaWiki 1.26.0
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();
}
}