From 22f371ccdb9ae4c2c001395e89e2b262afaf5c32 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 19 Oct 2022 14:11:46 +0200 Subject: [PATCH] blog 3.1 bug minitaure rss --- module/blog/blog.php | 8 ++++---- module/blog/changes.md | 5 +++++ module/blog/view/index/index.php | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index ddd49d14..bf13d2fa 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -16,7 +16,7 @@ class blog extends common { - const VERSION = '6.3'; + const VERSION = '6.31'; const REALNAME = 'Blog'; const DELETE = true; const UPDATE = '0.0'; @@ -173,8 +173,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 @@ -182,7 +182,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' => '' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
 						. '' . diff --git a/module/blog/changes.md b/module/blog/changes.md index aa66f06f..88f7610c 100755 --- a/module/blog/changes.md +++ b/module/blog/changes.md @@ -1,3 +1,8 @@ +# version 6.31 +- Miniature de l'image dans le flux RSS +# version 6.3 +- Nettoyage de fonction inutile +- Initialisation # version 6.22 - mise en oeuvre du helper dateUTF8 - Réglage de l'initialisaion de la configuration diff --git a/module/blog/view/index/index.php b/module/blog/view/index/index.php index 6c8c2fa4..fb34e704 100755 --- a/module/blog/view/index/index.php +++ b/module/blog/view/index/index.php @@ -93,8 +93,8 @@ ) : ?>
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(