diff --git a/CHANGES.md b/CHANGES.md index 1b348383..7fd31d9e 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ # Changelog +## Version 11.2.02 +- Modification : + - Configuration : + - Le numéro de version est désormais affiché dans le bloc Mise à jour. + - Le bloc Mise à jour dans l'écran de configuration est modifié ; les numéros de version installé et en ligne, si disponible, sont affichés. + - Le libellé du bouton de Réinstaller devient Mettre à jour selon le cas de figure. + ## Version 11.2.01 - Mises à jour : - jQuery v3.6.0 diff --git a/core/module/config/config.php b/core/module/config/config.php index 68061356..0524bd9d 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -195,6 +195,8 @@ class config extends common { // Variable pour construire la liste des pages du site public static $pagesList = []; public static $orphansList = []; + public static $onlineVersion = ''; + public static $updateButtonText = 'Réinstaller'; /** * Génére les fichiers pour les crawlers @@ -607,6 +609,13 @@ class config extends common { unset(self::$orphansList[$page]); } } + + // Variable de version + self::$onlineVersion = helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version'); + if (self::$onlineVersion !== common::ZWII_VERSION) { + self::$updateButtonText = "Mettre à jour" ; + } + // Valeurs en sortie $this->addOutput([ 'title' => 'Configuration', diff --git a/core/module/config/view/locale/locale.php b/core/module/config/view/locale/locale.php index 155418c6..80d499bd 100644 --- a/core/module/config/view/locale/locale.php +++ b/core/module/config/view/locale/locale.php @@ -25,20 +25,13 @@