Skip to content

Commit

Permalink
use correct class for Sitemap generation. fixes #3134
Browse files Browse the repository at this point in the history
This seems to have been a refactoring error
  • Loading branch information
splitbrain committed Jun 4, 2020
1 parent 85b0dd7 commit b6c12ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions inc/Action/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace dokuwiki\Action;

use dokuwiki\Action\Exception\FatalException;
use dokuwiki\Sitemap\Mapper;

/**
* Class Sitemap
Expand Down Expand Up @@ -32,16 +33,16 @@ public function preProcess() {
throw new FatalException('Sitemap generation is disabled', 404);
}

$sitemap = Sitemap::getFilePath();
if(Sitemap::sitemapIsCompressed()) {
$sitemap = Mapper::getFilePath();
if(Mapper::sitemapIsCompressed()) {
$mime = 'application/x-gzip';
} else {
$mime = 'application/xml; charset=utf-8';
}

// Check if sitemap file exists, otherwise create it
if(!is_readable($sitemap)) {
Sitemap::generate();
Mapper::generate();
}

if(is_readable($sitemap)) {
Expand Down

0 comments on commit b6c12ff

Please sign in to comment.