/**
* Purge a namespace or all pages
+ *
+ * @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();
/**
* Helper to purge an array of $urls
- * @param $urls array List of URLS to purge from squids
+ * @param array $urls List of URLS to purge from squids
*/
private function sendPurgeRequest( $urls ) {
if ( $this->hasOption( 'delay' ) ) {
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();
}
}
-
}
$maintClass = "PurgeList";