From fb6245fd0a0ab063893cdc05a156557bd255f9f5 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 6 Jun 2021 19:14:25 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"check=20id=20identique=20=C3=A0=20un?= =?UTF-8?q?=20dossier=20du=20site"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d01a7177095a69a9dd1d7f6770b3beec286d063b. --- 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 11b102fb..0aca5216 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -312,6 +312,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