news 4.22 anrning à l'initialisation

This commit is contained in:
Fred Tempez 2022-10-10 09:27:21 +02:00
parent 41b704f4f5
commit 13cb7a4b69
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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%' ]);