[9.1.12] fix sitemap.xml

This commit is contained in:
fredtempez 2019-06-18 16:25:39 +02:00
parent 59fde383f0
commit af97ef8f2d
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,11 @@
# Changelog # Changelog
## Version 9.1.12
- Amélioration :
- Contrôle d'erreur dans la gestion de l'imagette OpenGraph
- Correction:
- Sitemap.xml : prendre en compte les sous-pages d'une page parente masquée
## Version 9.1.11 ## Version 9.1.11
- Correction : - Correction :
- Générateur de sitemap.xml, correction de syntaxe. - Générateur de sitemap.xml, correction de syntaxe.

View File

@ -665,12 +665,14 @@ class common {
foreach($this->getHierarchy(null, null, null) as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy(null, null, null) as $parentPageId => $childrenPageIds) {
// Exclure les barres et les pages non publiques et les pages masquées // Exclure les barres et les pages non publiques et les pages masquées
if ($this->getData(['page',$parentPageId,'group']) !== 0 || if ($this->getData(['page',$parentPageId,'group']) !== 0 ||
$this->getData(['page', $parentPageId, 'disable']) === true ||
$this->getData(['page', $parentPageId, 'block']) === 'bar' ) { $this->getData(['page', $parentPageId, 'block']) === 'bar' ) {
continue; continue;
} }
// Page désactivée, traiter les sous-pages sans prendre en compte la page parente.
if ($this->getData(['page', $parentPageId, 'disable']) !== true ) {
$sitemap->addUrl ($parentPageId,$datetime);
}
// Sous-pages // Sous-pages
$sitemap->addUrl ($parentPageId,$datetime);
foreach($childrenPageIds as $childKey) { foreach($childrenPageIds as $childKey) {
if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) { if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
continue; continue;