From 0c68f360887f31df6948e60dd55e5308395cdb78 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 10 Jun 2019 16:21:41 +0200 Subject: [PATCH] [9.1.10] fix sitemap.xml article brouillon --- core/core.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/core.php b/core/core.php index 81d781d0..3f58ba89 100644 --- a/core/core.php +++ b/core/core.php @@ -673,15 +673,19 @@ class common { // La sous-page est un blog if ($this->getData(['page', $childKey, 'moduleId']) === 'blog') { - foreach($this->getData(['module',$childKey]) as $articleId => $article) { - $sitemap->addUrl( $childKey . '/' . $articleId ) ; + foreach($this->getData(['module',$childKey]) as $articleId => $article) { + if($this->getData(['module',$childKey,$articleId,'state']) === true) { + $sitemap->addUrl( $childKey . '/' . $articleId ) ; + } } } } // Articles du blog if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog') { - foreach($this->getData(['module',$parentPageId]) as $articleId => $article) { - $sitemap->addUrl( $parentPageId . '/' . $articleId ) ; + foreach($this->getData(['module',$parentPageId]) as $articleId => $article) { + if($this->getData(['module',$parentPageId,$articleId,'state']) === true) { + $sitemap->addUrl( $parentPageId . '/' . $articleId ) ; + } } } }