Merge "Hard deprecate MWNamespace::canTalk()"
[lhc/web/wiklou.git] / maintenance / purgeChangedPages.php
index cf65c69..feeac92 100644 (file)
@@ -52,7 +52,7 @@ class PurgeChangedPages extends Maintenance {
                global $wgHTCPRouting;
 
                if ( $this->hasOption( 'htcp-dest' ) ) {
-                       $parts = explode( ':', $this->getOption( 'htcp-dest' ) );
+                       $parts = explode( ':', $this->getOption( 'htcp-dest' ), 2 );
                        if ( count( $parts ) < 2 ) {
                                // Add default htcp port
                                $parts[] = '4827';
@@ -79,7 +79,7 @@ class PurgeChangedPages extends Maintenance {
                $stuckCount = 0; // loop breaker
                while ( true ) {
                        // Adjust bach size if we are stuck in a second that had many changes
-                       $bSize = $this->mBatchSize + ( $stuckCount * $this->mBatchSize );
+                       $bSize = ( $stuckCount + 1 ) * $this->getBatchSize();
 
                        $res = $dbr->select(
                                [ 'page', 'revision' ],
@@ -190,5 +190,5 @@ class PurgeChangedPages extends Maintenance {
        }
 }
 
-$maintClass = "PurgeChangedPages";
+$maintClass = PurgeChangedPages::class;
 require_once RUN_MAINTENANCE_IF_MAIN;