mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
FIX Using new config API
Used the new config API to turn off source file comments. This stops deprecation notices being thrown
This commit is contained in:
parent
a233c2d514
commit
cc215ace29
@ -30,7 +30,7 @@ class GoogleSitemapController extends Controller {
|
||||
*/
|
||||
public function index($url) {
|
||||
if(GoogleSitemap::enabled()) {
|
||||
SSViewer::set_source_file_comments(false);
|
||||
Config::inst()->update('SSViewer', 'set_source_file_comments', false);
|
||||
|
||||
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
||||
|
||||
@ -56,7 +56,7 @@ class GoogleSitemapController extends Controller {
|
||||
$page = $this->request->param('OtherID');
|
||||
|
||||
if(GoogleSitemap::enabled() && $class && $page) {
|
||||
SSViewer::set_source_file_comments(false);
|
||||
Config::inst()->update('SSViewer', 'set_source_file_comments', false);
|
||||
|
||||
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user