class PurgeList extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Send purge requests for listed pages to squid";
+ $this->addDescription( 'Send purge requests for listed pages to squid' );
$this->addOption( 'purge', 'Whether to update page_touched.', false, false );
$this->addOption( 'namespace', 'Namespace number', false, true );
$this->addOption( 'all', 'Purge all pages', false, false );
* @param int|bool $namespace
*/
private function purgeNamespace( $namespace = false ) {
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = $this->getDB( DB_SLAVE );
$startId = 0;
if ( $namespace === false ) {
$conds = array();
if ( $this->hasOption( 'verbose' ) ) {
$this->output( $url . "\n" );
}
- $u = new SquidUpdate( array( $url ) );
+ $u = new CdnCacheUpdate( array( $url ) );
$u->doUpdate();
usleep( $delay * 1e6 );
}
if ( $this->hasOption( 'verbose' ) ) {
$this->output( implode( "\n", $urls ) . "\n" );
}
- $u = new SquidUpdate( $urls );
+ $u = new CdnCacheUpdate( $urls );
$u->doUpdate();
}
}