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:
Mark-M 2013-05-31 15:33:38 +02:00
parent a233c2d514
commit cc215ace29

View File

@ -30,7 +30,7 @@ class GoogleSitemapController extends Controller {
*/ */
public function index($url) { public function index($url) {
if(GoogleSitemap::enabled()) { 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"'); $this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
@ -56,7 +56,7 @@ class GoogleSitemapController extends Controller {
$page = $this->request->param('OtherID'); $page = $this->request->param('OtherID');
if(GoogleSitemap::enabled() && $class && $page) { 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"'); $this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');