From 5a8fc68049e43344fe827453d3163c3018c02ef3 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 7 Mar 2024 17:47:54 +0100 Subject: [PATCH] =?UTF-8?q?1700=20Mise=20=C3=A0=20jour=20des=20chemins=20d?= =?UTF-8?q?ans=20le=20profil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/include/update.inc.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index f46c54f..d982a4f 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -1,5 +1,23 @@ getData(['core', 'dataVersion']) < 1700 +) { + // Supprime la variable path des profils, seul l'accès à l'espace et autorisé. + foreach (['1', '2'] as $group) { + foreach ( array_keys($this->getData(['profil', $group])) as $profil) { + if (is_null($this->getData(['profil', $group, $profil, 'folder', 'path'])) === false) { + $path = $this->getData(['profil', $group, $profil, 'folder', 'path']); + $this->setData(['profil', $group, $profil, 'folder', 'homePath', $path]); + $this->setData(['profil', $group, $profil, 'folder', 'coursePath', $path]); + $this->deleteData(['profil', $group, $profil, 'folder', 'path']); + } + } + } + $this->setData(['core', 'dataVersion', 1700]); +} \ No newline at end of file