phpdoc @return MediaWikiTitleCodec in Title::getTitleParser
[lhc/web/wiklou.git] / maintenance / generateSitemap.php
index 12711ea..256824e 100644 (file)
@@ -145,7 +145,7 @@ class GenerateSitemap extends Maintenance {
         */
        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',
@@ -196,7 +196,7 @@ class GenerateSitemap extends Maintenance {
                $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' );