11511 bug rss

This commit is contained in:
Fred Tempez 2022-10-19 14:20:02 +02:00
parent 4d37279518
commit db3839343d
5 changed files with 11 additions and 7 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## Version 11.5.11
### Correction :
- Génération du flux RSS dans le module blog, URL des miniatures incorrects.
## Version 11.5.10
### Correction :
- Dysfonctionnement de la classe strftime, setlocale mal défini.

View File

@ -1,4 +1,4 @@
# ZwiiCMS 11.5.10
# ZwiiCMS 11.5.11
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.

View File

@ -46,7 +46,7 @@ class common
// Numéro de version
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '11.5.10';
const ZWII_VERSION = '11.5.11';
const ZWII_UPDATE_CHANNEL = "v11";
public static $actions = [];

View File

@ -144,8 +144,8 @@ class blog extends common {
foreach( $articleIdsPublishedOns as $articleId => $articlePublishedOn ) {
if( $articlePublishedOn <= time() AND $articleIdsStates[$articleId] ) {
// Miniature
$parts = explode('/',$this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
$thumb = str_replace ($parts[(count($parts)-1)],'mini_' . $parts[(count($parts)-1)], $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
$parts = pathinfo($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
$thumb = 'mini_' . $parts['basename'];
// Créer les articles du flux
$newsArticle = $feeds->createNewItem();
// Signature de l'article
@ -153,7 +153,7 @@ class blog extends common {
$newsArticle->addElementArray([
'title' => $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title']),
'link' => helper::baseUrl() .$this->getUrl(0) . '/' . $articleId,
'description' => '<img src="' . helper::baseUrl() . self::FILE_DIR . $thumb
'description' => '<img src="' . helper::baseUrl(false) . self::FILE_DIR . $thumb
. '" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
. '" title="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
. '" />' .

View File

@ -6,8 +6,8 @@
<div class="col3">
<?php if ( file_exists(self::FILE_DIR . 'source/' . $article['picture']) ): ?>
<?php // Déterminer le nom de la miniature
$parts = explode('/',$article['picture']);
$thumb = str_replace ($parts[(count($parts)-1)],'mini_' . $parts[(count($parts)-1)], $article['picture']);
$parts = pathinfo($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
$thumb = 'mini_' . $parts['basename'];
// Créer la miniature si manquante
if (!file_exists( self::FILE_DIR . 'thumb/' . $thumb) ) {
$this->makeThumb( self::FILE_DIR . 'source/' . $article['picture'],