X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=maintenance%2FgenerateSitemap.php;h=aef45bff67c159a059407c2c8bc0997881f80343;hb=ac619fc4a60f4d7538b0fda496f25d2eb7f0c220;hp=05dd0d08ab6d5b793b8d9d7f251131a07e33e66f;hpb=efe7286cac744ccc7bce5417d20601a387f6d1ad;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index 05dd0d08ab..aef45bff67 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -188,18 +188,20 @@ class GenerateSitemap extends Maintenance { $this->fatalError( "Can not create directory $fspath." ); } + $dbDomain = WikiMap::getCurrentWikiDbDomain()->getId(); $this->fspath = realpath( $fspath ) . DIRECTORY_SEPARATOR; $this->urlpath = $this->getOption( 'urlpath', "" ); if ( $this->urlpath !== "" && substr( $this->urlpath, -1 ) !== '/' ) { $this->urlpath .= '/'; } - $this->identifier = $this->getOption( 'identifier', wfWikiID() ); + $this->identifier = $this->getOption( 'identifier', $dbDomain ); $this->compress = $this->getOption( 'compress', 'yes' ) !== 'no'; $this->skipRedirects = $this->hasOption( 'skip-redirects' ); $this->dbr = $this->getDB( DB_REPLICA ); $this->generateNamespaces(); $this->timestamp = wfTimestamp( TS_ISO_8601, wfTimestampNow() ); - $this->findex = fopen( "{$this->fspath}sitemap-index-{$this->identifier}.xml", 'wb' ); + $encIdentifier = rawurlencode( $this->identifier ); + $this->findex = fopen( "{$this->fspath}sitemap-index-{$encIdentifier}.xml", 'wb' ); $this->main(); }