Merge "Show redirect fragments on Special:ListRedirects"
[lhc/web/wiklou.git] / maintenance / compareParserCache.php
index e5f0bb3..8bd060f 100644 (file)
@@ -35,7 +35,7 @@ class CompareParserCache extends Maintenance {
        public function execute() {
                $pages = $this->getOption( 'maxpages' );
 
-               $dbr = $this->getDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_REPLICA );
 
                $totalsec = 0.0;
                $scanned = 0;
@@ -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 ) {