forked from ZwiiCMS-Team/ZwiiCMS
Bug sitemap date format
This commit is contained in:
parent
470c017184
commit
b403816c88
@ -1074,8 +1074,8 @@ class common
|
||||
foreach ($this->getData(['module', $parentPageId, 'posts']) as $articleId => $article) {
|
||||
if ($this->getData(['module', $parentPageId, 'posts', $articleId, 'state']) === true) {
|
||||
$date = $this->getData(['module', $parentPageId, 'posts', $articleId, 'publishedOn']);
|
||||
$sitemap->addUrl('/' . $parentPageId . '/' . $articleId, new DateTime("@{$date}", new DateTimeZone($timezone)));
|
||||
}
|
||||
$sitemap->addUrl('/' . $parentPageId . '/' . $articleId, DateTime::createFromFormat('U', $date));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sous-pages
|
||||
@ -1097,7 +1097,7 @@ class common
|
||||
if ($this->getData(['module', $childKey, 'posts', $articleId, 'state']) === true) {
|
||||
$date = $this->getData(['module', $childKey, 'posts', $articleId, 'publishedOn']);
|
||||
$sitemap->addUrl('/' . $childKey . '/' . $articleId, new DateTime("@{$date}", new DateTimeZone($timezone)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user