X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FgenerateSitemap.php;h=5a2c6c7bdf32e164eeba8ac6b09f12fdb54ff849;hb=e9d42c0e7ea9390f650de8e350a4f64ff19787b0;hp=26a9c399354a66657f3e8f82a5435999f6de2de0;hpb=1b13888ed6bd09731f10045650714a3392bb55df;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index 26a9c39935..5a2c6c7bdf 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -182,7 +182,7 @@ class GenerateSitemap extends Maintenance { # Create directory if needed $fspath = $this->getOption( 'fspath', getcwd() ); if ( !wfMkdirParents( $fspath, null, __METHOD__ ) ) { - $this->error( "Can not create directory $fspath.", 1 ); + $this->fatalError( "Can not create directory $fspath." ); } $this->fspath = realpath( $fspath ) . DIRECTORY_SEPARATOR; @@ -440,8 +440,8 @@ class GenerateSitemap extends Maintenance { /** * Get a sitemap filename * - * @param int $namespace The namespace - * @param int $count The count + * @param int $namespace + * @param int $count * @return string */ function sitemapFilename( $namespace, $count ) { @@ -484,8 +484,7 @@ class GenerateSitemap extends Maintenance { * @return string */ function indexEntry( $filename ) { - return - "\t\n" . + return "\t\n" . "\t\t{$this->urlpath}$filename\n" . "\t\t{$this->timestamp}\n" . "\t\n"; @@ -518,8 +517,7 @@ class GenerateSitemap extends Maintenance { * @return string */ function fileEntry( $url, $date, $priority ) { - return - "\t\n" . + return "\t\n" . // T36666: $url may contain bad characters such as ampersands. "\t\t" . htmlspecialchars( $url ) . "\n" . "\t\t$date\n" . @@ -557,5 +555,5 @@ class GenerateSitemap extends Maintenance { } } -$maintClass = "GenerateSitemap"; +$maintClass = GenerateSitemap::class; require_once RUN_MAINTENANCE_IF_MAIN;