From 13cb7a4b693c9623013a48ff71833eb9628f6ead Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 10 Oct 2022 09:27:21 +0200 Subject: [PATCH] =?UTF-8?q?news=204.22=20anrning=20=C3=A0=20l'initialisati?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/news/changes.md | 2 ++ module/news/news.php | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/news/changes.md b/module/news/changes.md index 2c312370..241fbe16 100644 --- a/module/news/changes.md +++ b/module/news/changes.md @@ -1,3 +1,5 @@ +# Version 4.22 + - Initialisation du module # Version 4.21 - Prise en compte de la classe strftime et du helper dateUTF8 # Version 4.2 diff --git a/module/news/news.php b/module/news/news.php index c5f50314..d011ee07 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -15,7 +15,7 @@ class news extends common { - const VERSION = '4.21'; + const VERSION = '4.22'; const REALNAME = 'News'; const DATADIRECTORY = self::DATA_DIR . 'news/'; @@ -525,15 +525,14 @@ class news extends common { */ private function update() { - $versionData = $this->getData(['module',$this->getUrl(0),'config', 'versionData' ]); - // le module n'est pas initialisé - if ( $versionData === NULL + if ( $this->getData(['module',$this->getUrl(0)]) === NULL || !file_exists(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css') ) { $this->init(); } + $versionData = $this->getData(['module',$this->getUrl(0),'config', 'versionData' ]); // Mise à jour 3.2 if (version_compare($versionData, '3.1', '<') ) { $this->setData(['module',$this->getUrl(0),'theme', 'itemsBlur', '0%' ]);