*/
private $identifier;
- /**
- * Constructor
- */
public function __construct() {
parent::__construct();
$this->addDescription( 'Creates a sitemap for the site' );
}
$this->identifier = $this->getOption( 'identifier', wfWikiID() );
$this->compress = $this->getOption( 'compress', 'yes' ) !== 'no';
- $this->skipRedirects = $this->getOption( 'skip-redirects', false ) !== false;
+ $this->skipRedirects = $this->hasOption( 'skip-redirects' );
$this->dbr = $this->getDB( DB_REPLICA );
$this->generateNamespaces();
$this->timestamp = wfTimestamp( TS_ISO_8601, wfTimestampNow() );
function fileEntry( $url, $date, $priority ) {
return
"\t<url>\n" .
- // bug 34666: $url may contain bad characters such as ampersands.
+ // T36666: $url may contain bad characters such as ampersands.
"\t\t<loc>" . htmlspecialchars( $url ) . "</loc>\n" .
"\t\t<lastmod>$date</lastmod>\n" .
"\t\t<priority>$priority</priority>\n" .
* @param int $namespace
*/
function generateLimit( $namespace ) {
- // bug 17961: make a title with the longest possible URL in this namespace
+ // T19961: make a title with the longest possible URL in this namespace
$title = Title::makeTitle( $namespace, str_repeat( "\xf0\xa8\xae\x81", 63 ) . "\xe5\x96\x83" );
$this->limit = [