X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrefreshLinks.php;h=cea9e0cbaba947c3d45e9ece575a2b28a534965e;hb=f600b4ede9a6390cc5e929d2a48ed98af2edbc60;hp=facc5064c1bb18d1a4e59dd945b079a459e24d15;hpb=e0f53bfb8dd461f52dbfe1339323704e7cac55fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index facc5064c1..cea9e0cbab 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -72,17 +72,17 @@ class RefreshLinks extends Maintenance { if ( !$title ) { $this->error( "'$category' is an invalid category name!\n", true ); } - $this->refreshCategory( $category ); + $this->refreshCategory( $title ); } elseif ( ( $category = $this->getOption( 'tracking-category', false ) ) !== false ) { $this->refreshTrackingCategory( $category ); } elseif ( !$this->hasOption( 'dfn-only' ) ) { - $new = $this->getOption( 'new-only', false ); - $redir = $this->getOption( 'redirects-only', false ); - $oldRedir = $this->getOption( 'old-redirects-only', false ); + $new = $this->hasOption( 'new-only' ); + $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 ); } } @@ -448,7 +448,7 @@ class RefreshLinks extends Maintenance { do { $finalConds = $conds; $timestamp = $dbr->addQuotes( $timestamp ); - $finalConds []= + $finalConds [] = "(cl_timestamp > $timestamp OR (cl_timestamp = $timestamp AND cl_from > $lastId))"; $res = $dbr->select( [ 'page', 'categorylinks' ], [ 'page_id', 'cl_timestamp' ], @@ -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() ); } /**