mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Remove unneeded config flag
This commit is contained in:
parent
77f6a02ae7
commit
56b23dbdf8
@ -38,8 +38,6 @@ class GoogleSitemapController extends Controller
|
|||||||
public function index($url)
|
public function index($url)
|
||||||
{
|
{
|
||||||
if (GoogleSitemap::enabled()) {
|
if (GoogleSitemap::enabled()) {
|
||||||
Config::inst()->update('SilverStripe\\View\\SSViewer', 'set_source_file_comments', false);
|
|
||||||
|
|
||||||
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
||||||
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');
|
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');
|
||||||
|
|
||||||
@ -66,8 +64,6 @@ class GoogleSitemapController extends Controller
|
|||||||
$page = $this->request->param('OtherID');
|
$page = $this->request->param('OtherID');
|
||||||
|
|
||||||
if (GoogleSitemap::enabled() && $class && $page && ($class == SiteTree::class || $class == 'GoogleSitemapRoute' || GoogleSitemap::is_registered($class))) {
|
if (GoogleSitemap::enabled() && $class && $page && ($class == SiteTree::class || $class == 'GoogleSitemapRoute' || GoogleSitemap::is_registered($class))) {
|
||||||
Config::inst()->update('SilverStripe\\View\\SSViewer', 'set_source_file_comments', false);
|
|
||||||
|
|
||||||
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
||||||
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');
|
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user