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';
$this->verbose( "Purged file {$row->log_title}; {$type} @{$row->log_timestamp}.\n" );
- if ( $this->hasOption( 'sleep-per-batch' ) && ++$bSize > $this->mBatchSize ) {
+ if ( $this->hasOption( 'sleep-per-batch' ) && ++$bSize > $this->getBatchSize() ) {
$bSize = 0;
// sleep-per-batch is milliseconds, usleep wants micro seconds.
usleep( 1000 * (int)$this->getOption( 'sleep-per-batch' ) );
}
}
-$maintClass = "PurgeChangedFiles";
+$maintClass = PurgeChangedFiles::class;
require_once RUN_MAINTENANCE_IF_MAIN;