Check dossier identique dans l'assistant et nom dans la page
This commit is contained in:
parent
511083693f
commit
f568e3397e
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user