Browse Source

Evolution #831: sitemap: avertissement

Bastien Sevajol 11 years ago
parent
commit
d9a34fbb3c
2 changed files with 3 additions and 1 deletions
  1. 2 0
      src/Muzich/CoreBundle/Command/GenerateRobotFilesCommand.php
  2. 1 1
      web/sitemap.xml

+ 2 - 0
src/Muzich/CoreBundle/Command/GenerateRobotFilesCommand.php View File

35
   protected function init()
35
   protected function init()
36
   {
36
   {
37
     $this->sitemap_content = new \DOMDocument('1.0', 'utf-8');
37
     $this->sitemap_content = new \DOMDocument('1.0', 'utf-8');
38
+    
38
     $this->sitemap_urls = $this->sitemap_content->createElement('urlset');
39
     $this->sitemap_urls = $this->sitemap_content->createElement('urlset');
40
+    $this->sitemap_urls->setAttributeNode(new \DOMAttr('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9'));
39
     $this->router = $this->getContainer()->get('router');
41
     $this->router = $this->getContainer()->get('router');
40
     $this->locales = $this->getContainer()->getParameter('supported_langs');
42
     $this->locales = $this->getContainer()->getParameter('supported_langs');
41
     $this->siteurl_prefix = $this->getContainer()->getParameter('siteurl');
43
     $this->siteurl_prefix = $this->getContainer()->getParameter('siteurl');

File diff suppressed because it is too large
+ 1 - 1
web/sitemap.xml