From 682b5f72ba17b5679bcb920855498df3fe25c143 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 8 Jun 2019 21:30:12 +0200 Subject: [PATCH] =?UTF-8?q?[9.1.09]=20Sitemap=20corrig=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 10 ++++++---- core/module/sitemap/view/index/index.php | 23 ++++++++++++----------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/core/core.php b/core/core.php index c31a895c..f23b0b7a 100644 --- a/core/core.php +++ b/core/core.php @@ -658,14 +658,16 @@ class common { $datetime->format(DateTime::ATOM); // Updated ISO8601 // sitemap index file name $sitemap->sitemapIndexFileName = "sitemap-index.xml"; - foreach($this->getHierarchy(null, false, false) as $parentPageId => $childrenPageIds) { - // Exclure les barres et les pages non publiques - if ($this->getData(['page',$parentPageId,'group']) !== 0 || - $this->getData(['page',$parentPageId,'block']) === 'bar') { + foreach($this->getHierarchy(null, true, null) as $parentPageId => $childrenPageIds) { + // Exclure les barres et les pages non publiques et les pages masquées + if ($this->getData(['page',$parentPageId,'group']) !== 0 || $this->getData(['page', $parentPageId, 'disable']) === true) { continue; } $sitemap->addUrl ($parentPageId,$datetime); foreach($childrenPageIds as $childKey) { + if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) { + continue; + } $sitemap->addUrl($childKey,$datetime); } } diff --git a/core/module/sitemap/view/index/index.php b/core/module/sitemap/view/index/index.php index ad2c8ce2..d9f1850d 100755 --- a/core/module/sitemap/view/index/index.php +++ b/core/module/sitemap/view/index/index.php @@ -1,20 +1,21 @@