From 6ad5d62d1fb3bc44a58d33c181f58b315d59a170 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 23 May 2022 20:42:34 +0200 Subject: [PATCH 1/7] =?UTF-8?q?support=20image=20dans=20le=20r=C3=A9sum?= =?UTF-8?q?=C3=A9=20des=20articles.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/news/news.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/news/news.php b/module/news/news.php index 7545ba0b..6158e16e 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -450,7 +450,7 @@ class news extends common { $content = substr($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'content']), 0, $this->getData(['module', $this->getUrl(0), 'config', 'height'])); // Ne pas couper un mot $lastSpace = strrpos($content, ' ', -1 ); - self::$news[$newsIds[$i]]['content'] = substr(strip_tags($content,'

'), 0, $lastSpace) ; + self::$news[$newsIds[$i]]['content'] = substr(strip_tags($content,'

'), 0, $lastSpace) ; } // Mise en forme de la signature self::$news[$newsIds[$i]]['userId'] = $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'userId'])); From 18563c61bc08fb65b395aa656a10c78bdc37e224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 26 May 2022 19:00:58 +0200 Subject: [PATCH 2/7] =?UTF-8?q?Page=20ajouter=20nom=20court=20non=20d?= =?UTF-8?q?=C3=A9fini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 ++++ core/module/page/page.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 85d1911a..69ef28d4 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## Version 11.4.03 +### Corrections : +- Ajout d'un nouvelle page, le nom court n'est pas défini. + ## Version 11.4.02 ### Modification : - Liste des fontes, contrôle de validité amélioré. diff --git a/core/module/page/page.php b/core/module/page/page.php index f91fbdd7..9a13c7d3 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -153,7 +153,8 @@ class page extends common { 'displayMenu' => '0', 'hideMenuSide' => false, 'hideMenuHead' => false, - 'hideMenuChildren' => false + 'hideMenuChildren' => false, + 'shortTitle' => $pageTitle ] ]); // Creation du contenu de la page 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 3/7] =?UTF-8?q?Mise=20=C3=A0=20jour=20structure=20pour=20d?= =?UTF-8?q?ownload=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 From 9c6ef7a3463a59df4efda0e6473b380fc38964ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 26 May 2022 19:37:47 +0200 Subject: [PATCH 4/7] search correctif pour download --- module/search/search.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/module/search/search.php b/module/search/search.php index ae75307f..dab8b724 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -19,7 +19,7 @@ class search extends common { - const VERSION = '2.4'; + const VERSION = '2.5'; const REALNAME = 'Recherche'; const DATADIRECTORY = self::DATA_DIR . 'search/'; @@ -254,9 +254,13 @@ class search extends common { } // Articles d'une sous-page blog ou de news - if ($this->getData(['page', $childId, 'moduleId']) === 'blog' || $this->getData(['page', $childId, 'moduleId']) === 'news' - && $this->getData(['module',$parentId,'posts']) ) - { + if ( + ( $this->getData(['page', $childId, 'moduleId']) === 'blog' + || $this->getData(['page', $childId, 'moduleId']) === 'news' + || $this->getData(['page', $childId, 'moduleId']) === 'download' + ) + && $this->getData(['module',$childId,'posts']) + ) { foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) { if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) { $url = $childId . '/' . $articleId; @@ -273,8 +277,14 @@ class search extends common { } // Articles d'un blog ou de news - if ( $this->getData(['page', $parentId, 'moduleId']) === 'blog' || $this->getData(['page', $parentId, 'moduleId']) === 'news' - && $this->getData(['module',$parentId,'posts']) ) { + if ( + ( $this->getData(['page', $parentId, 'moduleId']) === 'blog' + || $this->getData(['page', $parentId, 'moduleId']) === 'news' + || $this->getData(['page', $parentId, 'moduleId']) === 'download' + ) + && $this->getData(['module',$parentId,'posts']) + ) { + foreach($this->getData(['module',$parentId,'posts']) as $articleId => $article) { if($this->getData(['module',$parentId,'posts',$articleId,'state']) === true) { From 784d73f7ee2e9d050232178826001e79653b4c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 26 May 2022 19:57:57 +0200 Subject: [PATCH 5/7] Bug de la fonction copie --- CHANGES.md | 1 + core/core.php | 10 ++++++---- core/module/config/config.php | 12 +++++------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 50960de6..edb3666f 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## Version 11.4.03 ### Corrections : - Ajout d'un nouvelle page, le nom court n'est pas défini. +- Bug de la fonction de copie interne utilisée lors de l'installation de la copie de thème, etc.. ### 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' diff --git a/core/core.php b/core/core.php index 6c4d0e13..335a6a4e 100644 --- a/core/core.php +++ b/core/core.php @@ -1208,17 +1208,19 @@ class common { // Boucler dans le dossier source en l'absence d'échec de lecture écriture while( $success AND $file = readdir($dir) ) { - if (( $file != '.' ) && ( $file != '..' )) { + + if (( $file != '.' ) && ( $file != '..' )) { if ( is_dir($src . '/' . $file) ){ // Appel récursif des sous-dossiers - $success = $success OR $this->copyDir($src . '/' . $file, $dst . '/' . $file); + $s = $this->copyDir($src . '/' . $file, $dst . '/' . $file); + $success = $s || $success; } else { - $success = $success OR copy($src . '/' . $file, $dst . '/' . $file); + $s = copy($src . '/' . $file, $dst . '/' . $file); + $success = $s || $success; } } } - closedir($dir); return $success; } diff --git a/core/module/config/config.php b/core/module/config/config.php index d38ec9ce..68604856 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -778,17 +778,15 @@ class config extends common { * Récupération des backups auto dans le gestionnaire de fichiers */ public function copyBackups() { - // Créer le répertoire manquant - if (!is_dir(self::FILE_DIR.'source/backup')) { - mkdir(self::FILE_DIR.'source/backup', 0755); - } - $this->copyDir(self::BACKUP_DIR, self::FILE_DIR . 'source/backup' ); + + $success = $this->copyDir(self::BACKUP_DIR, self::FILE_DIR . 'source/backup' ); + // Valeurs en sortie $this->addOutput([ 'title' => 'Configuration', 'view' => 'index', - 'notification' => 'Copie terminée', - 'state' => true + 'notification' => 'Copie terminée' . ($success ? ' avec succès' : ' avec des erreurs'), + 'state' => $success ]); } From d53e3b2df3ece8573d2c1d829fddd284afa446ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 26 May 2022 20:00:53 +0200 Subject: [PATCH 6/7] =?UTF-8?q?Restauration=20de=20=20l'installation=20?= =?UTF-8?q?=C3=A0=20partir=20du=20store?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/addon/addon.php | 2 -- core/module/addon/view/store/store.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/module/addon/addon.php b/core/module/addon/addon.php index 772f5648..7cb5792d 100644 --- a/core/module/addon/addon.php +++ b/core/module/addon/addon.php @@ -320,13 +320,11 @@ class addon extends common { ? strftime('%d %B %Y', $store[$key]['versionDate']) : utf8_encode(strftime('%d %B %Y', $store[$key]['versionDate'])), implode(', ', array_keys($inPagesTitle,$key)), - /* template::button('moduleExport' . $key, [ 'class' => $class, 'href' => helper::baseUrl(). $this->getUrl(0) . '/uploadItem/' . $key.'/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre 'value' => $ico ]) - */ ]; } } diff --git a/core/module/addon/view/store/store.php b/core/module/addon/view/store/store.php index 6d8e525d..b77beaff 100644 --- a/core/module/addon/view/store/store.php +++ b/core/module/addon/view/store/store.php @@ -9,7 +9,7 @@ - + \ No newline at end of file From 5c358028c9dc7d81dd373afb5ccdba480748a658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 26 May 2022 20:01:22 +0200 Subject: [PATCH 7/7] changes store --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index edb3666f..c10b9142 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ ### 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' +- Restauration de la fonction de téléchargement à partir du store. ## Version 11.4.02 ### Modification :