diff --git a/.htaccess b/.htaccess index 9bd3ba51..675e30ab 100644 --- a/.htaccess +++ b/.htaccess @@ -33,4 +33,18 @@ Options -Indexes # ne pas supprimer la ligne URL rewriting ! + + + + + # Enlever le slash final des URL +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_URI} ^(.+)/$ +RewriteRule ^ %1 [R=301,L] + # URL rewriting + + + + diff --git a/CHANGES.md b/CHANGES.md index 92de0c6d..6c0a85d2 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changelog +## Versions 13.3.03 + +** Corrections :** +- L'ajout d'un slash en fin d'adresse avec la réécriture active provoquait une mauvaise détermination des adresses des images dans TinyMCE. Résolution : une directive htaccess supprime tous les slash en fin d'adresse. +- Lorsque la page est ouverte en édition, un clic sur le bouton édition dans la barre d'administration affiche une erreur, le lien étant incorrect. Afin d'éviter cette erreur et une redondance, le bouton d'édition est masqué lorsque la page est éditée. + ## Versions 13.3.01 - 13.2.02 diff --git a/LISEZMOI.md b/LISEZMOI.md index bd8d7f6f..d33347b5 100644 --- a/LISEZMOI.md +++ b/LISEZMOI.md @@ -1,4 +1,4 @@ -# ZwiiCMS 13.3.02 +# ZwiiCMS 13.3.03 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/README.md b/README.md index 14435e9d..c69b3260 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ZwiiCMS 13.3.02 +# ZwiiCMS 13.3.03 Zwii is a database-less (flat-file) CMS that allows you to easily create and manage a web site without any programming knowledge. diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 49af25db..74d6438c 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -990,14 +990,14 @@ class layout extends common // Sur une page sans module or $this->getData(['page', $this->getUrl(0), 'moduleId']) === '' // Sur une page avec un module invalide - or (!is_null($this->getData(['page', $this->getUrl(2), 'moduleId'])) && + or (!is_null($this->getData(['page', $this->getUrl(2), 'moduleId'])) and !class_exists($this->getData(['page', $this->getUrl(2), 'moduleId'])) ) // Sur une page d'accueil or $this->getUrl(0) === '' ) { // Bouton Editer une page - if ($this->getUser('permission', 'page', 'edit')) { + if ($this->getUser('permission', 'page', 'edit') and $this->geturl(1) !== 'edit') { $leftItems .= '