Merge "Use our fork of less.php" into REL1_31
[lhc/web/wiklou.git] / maintenance / refreshLinks.php
index cea9e0c..49f1cd1 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 ) {
@@ -170,8 +170,8 @@ class RefreshLinks extends Maintenance {
                        }
                } else {
                        if ( !$end ) {
-                               $maxPage = $dbr->selectField( 'page', 'max(page_id)', false );
-                               $maxRD = $dbr->selectField( 'redirect', 'max(rd_from)', false );
+                               $maxPage = $dbr->selectField( 'page', 'max(page_id)', '', __METHOD__ );
+                               $maxRD = $dbr->selectField( 'redirect', 'max(rd_from)', '', __METHOD__ );
                                $end = max( $maxPage, $maxRD );
                        }
                        $this->output( "Refreshing redirects table.\n" );
@@ -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;