More Silverstripe 4 compatibility

This commit is contained in:
Mike Cochrane 2016-11-06 16:24:03 +13:00 committed by GitHub
parent 4333bb6777
commit 9f845f5af7
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class GoogleSitemapController extends Controller
public function index($url)
{
if (GoogleSitemap::enabled()) {
Config::inst()->update('SSViewer', 'set_source_file_comments', false);
Config::inst()->update('SilverStripe\\View\\SSViewer', 'set_source_file_comments', false);
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');
@ -66,7 +66,7 @@ class GoogleSitemapController extends Controller
$page = $this->request->param('OtherID');
if (GoogleSitemap::enabled() && $class && $page && ($class == SiteTree::class || $class == 'GoogleSitemapRoute' || GoogleSitemap::is_registered($class))) {
Config::inst()->update('SSViewer', 'set_source_file_comments', false);
Config::inst()->update('SilverStripe\\View\\SSViewer', 'set_source_file_comments', false);
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');