From cc215ace299310d4e8051d3199364087931255ee Mon Sep 17 00:00:00 2001 From: Mark-M Date: Fri, 31 May 2013 15:33:38 +0200 Subject: [PATCH] FIX Using new config API Used the new config API to turn off source file comments. This stops deprecation notices being thrown --- code/controllers/GoogleSitemapController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/GoogleSitemapController.php b/code/controllers/GoogleSitemapController.php index 5482f3f..1cf4ba2 100644 --- a/code/controllers/GoogleSitemapController.php +++ b/code/controllers/GoogleSitemapController.php @@ -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"'); @@ -70,4 +70,4 @@ class GoogleSitemapController extends Controller { return new SS_HTTPResponse('Page not found', 404); } } -} \ No newline at end of file +}