forked from ZwiiCMS-Team/ZwiiCMS
[9.0.12] check no folder with same pageId
This commit is contained in:
parent
c9c5fedd7e
commit
89f5bcab00
@ -28,7 +28,7 @@ class common {
|
||||
const GROUP_ADMIN = 3;
|
||||
|
||||
// Numéro de version stable
|
||||
const ZWII_VERSION = '9.0.11';
|
||||
const ZWII_VERSION = '9.0.12';
|
||||
|
||||
public static $actions = [];
|
||||
public static $coreModuleIds = [
|
||||
@ -1445,11 +1445,7 @@ class helper {
|
||||
// Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination
|
||||
if(intval($text) !== 0) {
|
||||
$text = 'i' . $text;
|
||||
}
|
||||
// un dossier existe du même nom (erreur en cas de redirection)
|
||||
if (file_exists($text)) {
|
||||
$text = 'p-' . $text;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case self::FILTER_INT:
|
||||
$text = (int) filter_var($text, FILTER_SANITIZE_NUMBER_INT);
|
||||
|
@ -162,6 +162,10 @@ class page extends common {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
$pageId = $this->getInput('pageEditTitle', helper::FILTER_ID, true);
|
||||
// un dossier existe du même nom (erreur en cas de redirection)
|
||||
if (file_exists($pageId)) {
|
||||
$pageId = 'p-' . $pageId;
|
||||
}
|
||||
// Si l'id a changée
|
||||
if ($pageId !== $this->getUrl(2)) {
|
||||
// Incrémente le nouvel id de la page
|
||||
|
2
core/vendor/tinymce/link_list.json
vendored
2
core/vendor/tinymce/link_list.json
vendored
@ -1 +1 @@
|
||||
[{"title":"Accueil","value":"?accueil","menu":[{"title":"Enfant","value":"?enfant"},{"title":"Mise en page","value":"?mise-en-page"}]},{"title":"Priv\u00e9e","value":"?privee"},{"title":"Blog","value":"?blog"},{"title":"Galeries","value":"?galeries"},{"title":"Site de Zwii","value":"?site-de-zwii"},{"title":"Contact","value":"?contact"}]
|
||||
[{"title":"Nouvelle page","value":"?nouvelle-page"},{"title":"Nouvelle page","value":"?nouvelle-page-2"},{"title":"Accueil","value":"?accueil-2"},{"title":"Priv\u00e9e","value":"?privee"},{"title":"Blog","value":"?blog"},{"title":"Galeries","value":"?galeries"},{"title":"Site de Zwii","value":"?site-de-zwii"},{"title":"Contact","value":"?p-contact"},{"title":"Accueil","value":"?accueil","menu":[{"title":"Enfant","value":"?enfant"},{"title":"Mise en page","value":"?mise-en-page"}]}]
|
Loading…
Reference in New Issue
Block a user