Change to getOptions, and addOption in Constructor
$callback = MW_CONFIG_CALLBACK;
# PHP 5.1 doesn't support "class::method" for call_user_func, so split it
if ( strpos( $callback, '::' ) !== false ) {
- $callback = explode( '::', $callback, 2);
+ $callback = explode( '::', $callback, 2 );
}
call_user_func( $callback );
} elseif ( file_exists( "$IP/wmf-config/wikimedia-mode" ) ) {
public function __construct() {
parent::__construct();
$this->mDescription = "Send purge requests for listed pages to squid";
+ $this->addOption( 'purge', 'Whether to update page touched.' , false, false );
}
public function execute() {
$url = $title->getFullUrl();
$this->output( "$url\n" );
$urls[] = $url;
- if ( isset( $options['purge'] ) ) {
+ if ( $this->getOptions( 'purge' ) ) {
$title->invalidateCache();
}
} else {