diff options
Diffstat (limited to 'inc/Sitemapper.php')
-rw-r--r-- | inc/Sitemapper.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php index bbea73b52..1315ed448 100644 --- a/inc/Sitemapper.php +++ b/inc/Sitemapper.php @@ -100,7 +100,7 @@ class Sitemapper { global $conf; $sitemap = $conf['cachedir'].'/sitemap.xml'; - if($conf['compression'] === 'bz2' || $conf['compression'] === 'gz'){ + if (self::sitemapIsCompressed()) { $sitemap .= '.gz'; } @@ -108,6 +108,16 @@ class Sitemapper { } /** + * Helper function for checking if the sitemap is compressed + * + * @return bool If the sitemap file is compressed + */ + public static function sitemapIsCompressed() { + global $conf; + return $conf['compression'] === 'bz2' || $conf['compression'] === 'gz'; + } + + /** * Pings search engines with the sitemap url. Plugins can add or remove * urls to ping using the SITEMAP_PING event. * |