Merge branch 'master' into extra_footer

This commit is contained in:
fredtempez 2019-06-20 20:27:06 +02:00
commit 2be1cdac5c
3 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,9 @@
# Changelog
## Version 9.1.12
- Correction :
- OpenGraph : pb lors de la suppression de l'imagette
- Amélioration :
- Contrôle d'erreur dans la gestion de l'imagette OpenGraph
- Correction:

View File

@ -681,7 +681,8 @@ class common {
$sitemap->addUrl($childKey,$datetime);
// La sous-page est un blog
if ($this->getData(['page', $childKey, 'moduleId']) === 'blog') {
if ($this->getData(['page', $childKey, 'moduleId']) === 'blog' &&
!empty($this->getData(['module',$childKey])) ) {
foreach($this->getData(['module',$childKey]) as $articleId => $article) {
if($this->getData(['module',$childKey,$articleId,'state']) === true) {
$date = $this->getData(['module',$childKey,$articleId,'publishedOn']);
@ -691,7 +692,8 @@ class common {
}
}
// Articles du blog
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog') {
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog' &&
!empty($this->getData(['module',$parentPageId])) ) {
foreach($this->getData(['module',$parentPageId]) as $articleId => $article) {
if($this->getData(['module',$parentPageId,$articleId,'state']) === true) {
$date = $this->getData(['module',$parentPageId,$articleId,'publishedOn']);

View File

@ -240,7 +240,9 @@ class config extends common {
$data = 'data:image/jpeg;base64,'.$screenshot;
$data = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $data));
// Effacer la miniature
if (file_exists(self::FILE_DIR.'thumb/screenshot.png')) {
unlink (self::FILE_DIR.'thumb/screenshot.png');
}
file_put_contents( self::FILE_DIR.'source/screenshot.png',$data);
$success =true;
}