*/
public function __construct() {
parent::__construct();
- $this->mDescription = "Creates a sitemap for the site";
+ $this->addDescription( 'Creates a sitemap for the site' );
$this->addOption(
'fspath',
'The file system path to save to, e.g. /tmp/sitemap; defaults to current directory',
$this->identifier = $this->getOption( 'identifier', wfWikiID() );
$this->compress = $this->getOption( 'compress', 'yes' ) !== 'no';
$this->skipRedirects = $this->getOption( 'skip-redirects', false ) !== false;
- $this->dbr = wfGetDB( DB_SLAVE );
+ $this->dbr = $this->getDB( DB_SLAVE );
$this->generateNamespaces();
$this->timestamp = wfTimestamp( TS_ISO_8601, wfTimestampNow() );
$this->findex = fopen( "{$this->fspath}sitemap-index-{$this->identifier}.xml", 'wb' );