Merge "Added support for enqueueable DataUpdates"
[lhc/web/wiklou.git] / maintenance / refreshLinks.php
index f6c721f..06e1449 100644 (file)
@@ -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 );
@@ -88,9 +88,6 @@ class RefreshLinks extends Maintenance {
                # 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();
                }
        }