mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Copy trunk to branch 0.1.4, is now 2.4-compatible
This commit is contained in:
commit
e8baa99c97
@ -139,8 +139,6 @@ class GoogleSitemap extends Controller {
|
|||||||
function index($url) {
|
function index($url) {
|
||||||
if(self::$enabled) {
|
if(self::$enabled) {
|
||||||
SSViewer::set_source_file_comments(false);
|
SSViewer::set_source_file_comments(false);
|
||||||
// We need to override the default content-type
|
|
||||||
ContentNegotiator::disable();
|
|
||||||
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
||||||
|
|
||||||
// But we want to still render.
|
// But we want to still render.
|
||||||
@ -158,4 +156,4 @@ class GoogleSitemap extends Controller {
|
|||||||
public static function disable() {
|
public static function disable() {
|
||||||
self::$enabled = false;
|
self::$enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user