From d2b4e702fe17ab94c9d47a05ca2728398cdcd49c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 5 Nov 2021 14:43:14 +0100 Subject: [PATCH] =?UTF-8?q?Bug=20page=20parent=20renomm=C3=A9e=20avec=20de?= =?UTF-8?q?s=20pages=20enfants=20absentes=20non=20affich=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/page/page.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/module/page/page.php b/core/module/page/page.php index 86011daa..edf184e3 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -259,7 +259,7 @@ class page extends common { ]); } // Impossible de supprimer une page contenant des enfants - elseif($this->getHierarchy($url[0])) { + elseif($this->getHierarchy($url[0],null)) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'page/edit/' . $url[0], @@ -327,7 +327,7 @@ class page extends common { $pageId = helper::increment($pageId, self::$coreModuleIds); $pageId = helper::increment($pageId, self::$moduleIds); // Met à jour les enfants - foreach($this->getHierarchy($this->getUrl(2)) as $childrenPageId) { + foreach($this->getHierarchy($this->getUrl(2),null) as $childrenPageId) { $this->setData(['page', $childrenPageId, 'parentPageId', $pageId]); } // Change l'id de page dans les données des modules @@ -378,7 +378,7 @@ class page extends common { } // Si la page est une page enfant, actualise les positions des autres enfants du parent, sinon actualise les pages sans parents $lastPosition = 1; - $hierarchy = $this->getInput('pageEditParentPageId') ? $this->getHierarchy($this->getInput('pageEditParentPageId')) : array_keys($this->getHierarchy()); + $hierarchy = $this->getInput('pageEditParentPageId') ? $this->getHierarchy($this->getInput('pageEditParentPageId'),null) : array_keys($this->getHierarchy()); $position = $this->getInput('pageEditPosition', helper::FILTER_INT); foreach($hierarchy as $hierarchyPageId) { // Ignore la page en cours de modification