X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrefreshLinks.php;h=9d5d39fd8ef149001cba4ddff396ef1b21f70c4b;hb=5db74eb56e425ba803b2cc936fbe3e5cc219b482;hp=b099aff44f360c44f0e5f4f08a60cc2460376691;hpb=a70c4a4c466db5663b845889cacdef00d7200760;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index b099aff44f..9d5d39fd8e 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -70,7 +70,7 @@ class RefreshLinks extends Maintenance { if ( ( $category = $this->getOption( 'category', false ) ) !== false ) { $title = Title::makeTitleSafe( NS_CATEGORY, $category ); if ( !$title ) { - $this->error( "'$category' is an invalid category name!\n", true ); + $this->fatalError( "'$category' is an invalid category name!\n" ); } $this->refreshCategory( $title ); } elseif ( ( $category = $this->getOption( 'tracking-category', false ) ) !== false ) { @@ -80,9 +80,9 @@ class RefreshLinks extends Maintenance { $redir = $this->hasOption( 'redirects-only' ); $oldRedir = $this->hasOption( 'old-redirects-only' ); $this->doRefreshLinks( $start, $new, $end, $redir, $oldRedir ); - $this->deleteLinksFromNonexistent( null, null, $this->mBatchSize, $dfnChunkSize ); + $this->deleteLinksFromNonexistent( null, null, $this->getBatchSize(), $dfnChunkSize ); } else { - $this->deleteLinksFromNonexistent( $start, $end, $this->mBatchSize, $dfnChunkSize ); + $this->deleteLinksFromNonexistent( $start, $end, $this->getBatchSize(), $dfnChunkSize ); } } @@ -456,7 +456,7 @@ class RefreshLinks extends Maintenance { __METHOD__, [ 'ORDER BY' => [ 'cl_timestamp', 'cl_from' ], - 'LIMIT' => $this->mBatchSize, + 'LIMIT' => $this->getBatchSize(), ] ); @@ -470,7 +470,7 @@ class RefreshLinks extends Maintenance { self::fixLinksFromArticle( $row->page_id ); } - } while ( $res->numRows() == $this->mBatchSize ); + } while ( $res->numRows() == $this->getBatchSize() ); } /** @@ -485,9 +485,9 @@ class RefreshLinks extends Maintenance { if ( isset( $cats[$categoryKey] ) ) { return $cats[$categoryKey]['cats']; } - $this->error( "Unknown tracking category {$categoryKey}\n", true ); + $this->fatalError( "Unknown tracking category {$categoryKey}\n" ); } } -$maintClass = 'RefreshLinks'; +$maintClass = RefreshLinks::class; require_once RUN_MAINTENANCE_IF_MAIN;