X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrefreshLinks.php;h=a0cd6a94f157a0fd0b34aedf8c358f4404b36539;hb=44cebea941236e165bf55e80565d6679529c7280;hp=ed168053d5036ebdf7646507a6daa86621abf4eb;hpb=5ad8f11baf52c1dbfbc19371647be775e0db6e74;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index ed168053d5..a0cd6a94f1 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -76,7 +76,7 @@ class RefreshLinks extends Maintenance { global $wgParser; $reportingInterval = 100; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_SLAVE ); if ( $start === null ) { $start = 1; @@ -192,7 +192,7 @@ class RefreshLinks extends Maintenance { */ private function fixRedirect( $id ) { $page = WikiPage::newFromID( $id ); - $dbw = wfGetDB( DB_MASTER ); + $dbw = $this->getDB( DB_MASTER ); if ( $page === null ) { // This page doesn't exist (any more) @@ -262,7 +262,7 @@ class RefreshLinks extends Maintenance { ) { wfWaitForSlaves(); $this->output( "Deleting illegal entries from the links tables...\n" ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_SLAVE ); do { // Find the start of the next chunk. This is based only // on existent page_ids. @@ -302,8 +302,8 @@ class RefreshLinks extends Maintenance { * @param int $batchSize The size of deletion batches */ private function dfnCheckInterval( $start = null, $end = null, $batchSize = 100 ) { - $dbw = wfGetDB( DB_MASTER ); - $dbr = wfGetDB( DB_SLAVE ); + $dbw = $this->getDB( DB_MASTER ); + $dbr = $this->getDB( DB_SLAVE ); $linksTables = array( // table name => page_id field 'pagelinks' => 'pl_from',