mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-06-30 00:19:22 +02:00
Compare commits
2 Commits
cb56ac11d9
...
cfcb002cf3
Author | SHA1 | Date | |
---|---|---|---|
|
cfcb002cf3 | ||
|
0e965ecd46 |
|
@ -68,11 +68,11 @@ class GoogleSitemapController extends Controller
|
|||
public function sitemap()
|
||||
{
|
||||
$class = $this->unsanitiseClassName($this->request->param('ID'));
|
||||
$page = $this->request->param('OtherID');
|
||||
$page = intval($this->request->param('OtherID'));
|
||||
|
||||
if (GoogleSitemap::enabled()
|
||||
&& $class
|
||||
&& $page
|
||||
&& ($page > 0)
|
||||
&& ($class == SiteTree::class || $class == 'GoogleSitemapRoute' || GoogleSitemap::is_registered($class))
|
||||
) {
|
||||
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
||||
|
|
Loading…
Reference in New Issue
Block a user