瀏覽代碼

Evolution #831: sitemap: avertissement

Bastien Sevajol 11 年之前
父節點
當前提交
d9a34fbb3c
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      src/Muzich/CoreBundle/Command/GenerateRobotFilesCommand.php
  2. 1 1
      web/sitemap.xml

+ 2 - 0
src/Muzich/CoreBundle/Command/GenerateRobotFilesCommand.php 查看文件

@@ -35,7 +35,9 @@ class GenerateRobotFilesCommand extends ContainerAwareCommand
35 35
   protected function init()
36 36
   {
37 37
     $this->sitemap_content = new \DOMDocument('1.0', 'utf-8');
38
+    
38 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 41
     $this->router = $this->getContainer()->get('router');
40 42
     $this->locales = $this->getContainer()->getParameter('supported_langs');
41 43
     $this->siteurl_prefix = $this->getContainer()->getParameter('siteurl');

文件差異過大導致無法顯示
+ 1 - 1
web/sitemap.xml