diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index c9c7c1ab..43d0c879 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -17,7 +17,7 @@ class gallery extends common { - const VERSION = '3.0'; + const VERSION = '3.1'; const REALNAME = 'Galerie'; const DELETE = true; const UPDATE = '0.0'; @@ -176,6 +176,14 @@ class gallery extends common { // Nouvelle version $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '3.0']); } + // Mise à jour 3.1 + if (version_compare($versionData, '3.1', '<') ) { + // Déplacer les données du dossier Pages + $this->copyDir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0), self::DATADIRECTORY . $this->getUrl(0)); + $this->removeDir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0)); + // Mettre à jour la version + $this->setData(['module',$this->getUrl(0),'config', 'versionData', '3.1' ]); + } } /** diff --git a/module/news/news.php b/module/news/news.php index 9ef27a6b..482cf2ba 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -489,9 +489,17 @@ class news extends common { // Mise à jour 3.2 if (version_compare($versionData, '3.1', '<') ) { $this->setData(['module',$this->getUrl(0),'theme', 'itemsBlur', '0%' ]); - // Mettre à jour la verison + // Mettre à jour la version $this->setData(['module',$this->getUrl(0),'config', 'versionData', '3.2' ]); } + // Mise à jour 3.3 + if (version_compare($versionData, '3.3', '<') ) { + // Déplacer les données du dossier Pages + $this->copyDir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0), self::DATADIRECTORY . $this->getUrl(0)); + $this->removeDir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0)); + // Mettre à jour la version + $this->setData(['module',$this->getUrl(0),'config', 'versionData', '3.3' ]); + } } /** diff --git a/module/search/search.php b/module/search/search.php index 98646309..33bd91f5 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -19,7 +19,7 @@ class search extends common { - const VERSION = '2.1'; + const VERSION = '2.2'; const REALNAME = 'Recherche'; const DELETE = true; const UPDATE = '0.0'; @@ -87,6 +87,14 @@ class search extends common { $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '2.0']); } + // Mise à jour 2.2 + if (version_compare($versionData, '2.2', '<') ) { + // Déplacer les données du dossier Pages + $this->copyDir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0), self::DATADIRECTORY . $this->getUrl(0)); + $this->removeDir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0)); + // Mettre à jour la version + $this->setData(['module',$this->getUrl(0),'config', 'versionData', '2.2' ]); + } } /**