Update IPSet use statements
[lhc/web/wiklou.git] / maintenance / refreshLinks.php
index 578a226..4fab146 100644 (file)
@@ -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 );
                }
        }
 
@@ -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() );
        }
 
        /**
@@ -485,7 +485,7 @@ 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" );
        }
 }