From b908be128780ec6e25c21f7273fc10985c270315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 26 May 2022 19:37:24 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20structure=20pour=20downl?= =?UTF-8?q?oad=202.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 3 +++ core/include/update.inc.php | 34 +++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 69ef28d4..50960de6 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,9 @@ ## Version 11.4.03 ### Corrections : - Ajout d'un nouvelle page, le nom court n'est pas défini. +### Modifications : +- Le module de recherche analyse les descriptions du module Download (Téléchargement). +- Prise en compte des modifications liées à la mise à jour du module Download (Téléchargement), actualisation du changement de structure 'posts' remplace 'items' ## Version 11.4.02 ### Modification : diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 1766a28e..28301d62 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -957,10 +957,17 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { // Redirection des pages d'administration vers la bannière de connexion $this->setData(['config', 'connect', 'redirectLogin', true]); - // Transforme les URL en références relatives - /* - $baseUrl = $this->getData(['core', 'baseUrl']); - $baseUrl2 = str_replace('?', '', $baseUrl); + // Suppression de la variable URL dans core + $this->deleteData(['core', 'baseUrl']); + + // Mise à jour + $this->setData(['core', 'dataVersion', 11400]); +} + +// Version 11.4.03 +if ($this->getData(['core', 'dataVersion']) < 11403) { + + // Modification de structure du module download foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) { $pageList [] = $parentKey; foreach ($parentValue as $childKey) { @@ -968,17 +975,14 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { } } foreach ($pageList as $parentKey => $parent) { - $s = $this->getPage( $parent, self::$i18n); - // Suppression des sous-dossiers - $s = str_replace ($baseUrl, './', $s); - $s = str_replace ($baseUrl2, './', $s); - $this->setPage( $parent, $s, self::$i18n); + if ($this->getData(['page', $parent, 'moduleId']) === 'download') { + $tempData = $this->getData(['module', $parent, 'items']); + $this->setData(['module', $parent, 'posts', $tempData]); + $this->deleteData(['module', $parent, 'items']); + } } - */ - - // Suppression de la variable URL dans core - $this->deleteData(['core', 'baseUrl']); - + // Mise à jour - $this->setData(['core', 'dataVersion', 11400]); + $this->setData(['core', 'dataVersion', 11403]); + } \ No newline at end of file