diff --git a/core/class/helper.class.php b/core/class/helper.class.php index 54e49a5f..9eebba7b 100644 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -345,6 +345,10 @@ 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 b41ee1a8..b63b473c 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -303,10 +303,6 @@ 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