From df5bd924cda5705aa9ebc04c0de540aa7c5eac76 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 6 Jun 2021 19:14:45 +0200 Subject: [PATCH] Revert "Check dossier identique dans l'assistant et nom dans la page" This reverts commit f568e3397ed53ab41224d4c311629da9aa0aff78. --- core/class/helper.class.php | 4 ---- core/module/page/page.php | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/class/helper.class.php b/core/class/helper.class.php index 9eebba7b..54e49a5f 100644 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -345,10 +345,6 @@ class helper { if (empty($text)) { $text = uniqid(''); } - // un dossier existe du même nom (erreur en cas de redirection) - if (file_exists($text)) { - $text = uniqid($text); - } // Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination if(intval($text) !== 0) { $text = '_' . $text; diff --git a/core/module/page/page.php b/core/module/page/page.php index b63b473c..b41ee1a8 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -303,6 +303,10 @@ class page extends common { } else { $pageId = $this->getUrl(2); } + // un dossier existe du même nom (erreur en cas de redirection) + if (file_exists($pageId)) { + $pageId = uniqid($pageId); + } // Si l'id a changée if ($pageId !== $this->getUrl(2)) { // Incrémente le nouvel id de la page