X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcompareParserCache.php;h=245b6131a666dacdb6fa6bcdb93b9058c8f46c30;hb=a69c730dbb3ef1f1243053f825b7fef92ba421e2;hp=98441b60237c4033b1a32033d7a69121b085eba7;hpb=806dcb725770a585f4b09f0a24ba2178a74561b5;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/compareParserCache.php b/maintenance/compareParserCache.php index 98441b6023..245b6131a6 100644 --- a/maintenance/compareParserCache.php +++ b/maintenance/compareParserCache.php @@ -27,7 +27,7 @@ require_once __DIR__ . '/Maintenance.php'; class CompareParserCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Parse random pages and compare output to cache."; + $this->addDescription( 'Parse random pages and compare output to cache.' ); $this->addOption( 'namespace', 'Page namespace number', true, true ); $this->addOption( 'maxpages', 'Number of pages to try', true, true ); } @@ -43,15 +43,15 @@ class CompareParserCache extends Maintenance { $withdiff = 0; while ( $pages-- > 0 ) { $row = $dbr->selectRow( 'page', '*', - array( + [ 'page_namespace' => $this->getOption( 'namespace' ), 'page_is_redirect' => 0, 'page_random >= ' . wfRandom() - ), + ], __METHOD__, - array( + [ 'ORDER BY' => 'page_random', - ) + ] ); if ( !$row ) {