From 34f0f8ff0dc4271e7feabe59d14ed1e5bc055217 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 22 Aug 2020 10:48:03 +0200 Subject: [PATCH] 10.2.08 bug pageId --- CHANGES.md | 4 ++++ README.md | 2 +- core/core.php | 2 +- core/module/page/page.php | 7 ++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b6bd1bbf..690a500b 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## version 10.2.08 +- Correction : + - Bug pageId, régression corrigée. + ## version 10.2.07 - Correction : - Défaut de chargement de flatpickr dans le module formulaire qui passe en version 2.4 diff --git a/README.md b/README.md index fd806728..77cd7536 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![](https://img.shields.io/github/last-commit/fredtempez/ZwiiCMS/master) ![](https://img.shields.io/github/release-date/fredtempez/ZwiiCMS) -# ZwiiCMS 10.2.07 +# ZwiiCMS 10.2.08 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. diff --git a/core/core.php b/core/core.php index 219210ef..a3f31036 100755 --- a/core/core.php +++ b/core/core.php @@ -39,7 +39,7 @@ class common { const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '10.2.07'; + const ZWII_VERSION = '10.2.08'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; diff --git a/core/module/page/page.php b/core/module/page/page.php index 0afd8acd..f409058e 100755 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -184,7 +184,12 @@ class page extends common { else { // Soumission du formulaire if($this->isPost()) { - $pageId = $this->getInput('pageEditTitle', helper::FILTER_ID, true); + // Génére l'ID si le titre de la page a changé + if ( $this->getInput('pageEditTitle') !== $this->getData(['page',$this->getUrl(2),'title']) ) { + $pageId = $this->getInput('pageEditTitle', helper::FILTER_ID, true); + } else { + $pageId = $this->getUrl(2); + } // un dossier existe du même nom (erreur en cas de redirection) if (file_exists($pageId)) { $pageId = uniqid($pageId);