From 245375c28ef36e23d458a487cf871faf34149015 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 2 Feb 2023 09:39:05 +0100 Subject: [PATCH 1/4] 12201 Allow to select extend input types, not only text (ex : color; week, etc) --- core/class/template.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/class/template.class.php b/core/class/template.class.php index 3cf93c38..99f1b455 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -871,7 +871,8 @@ class template 'name' => $nameId, 'placeholder' => '', 'readonly' => false, - 'value' => '' + 'value' => '', + 'type' => 'text' ], $attributes); // Traduction de l'aide et de l'étiquette $attributes['label'] = helper::translate($attributes['label']); @@ -898,7 +899,7 @@ class template $html .= self::notice($attributes['id'], $notice); // Texte $html .= sprintf( - '', + '', helper::sprintAttributes($attributes) ); // Fin du wrapper From f67f2deafb4ab63414faa282275ebc2daad10733 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 2 Feb 2023 15:28:35 +0100 Subject: [PATCH 2/4] =?UTF-8?q?12201=20Modules=20publi=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/blog/changes.md | 6 +++--- module/form/enum.json | 2 +- module/form/form.php | 2 +- module/gallery/enum.json | 2 +- module/news/enum.json | 2 +- module/news/news.php | 2 +- module/search/changes.md | 12 +++++++----- module/search/enum.json | 2 +- module/search/search.php | 2 +- 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/module/blog/changes.md b/module/blog/changes.md index ede9088a..0528223b 100755 --- a/module/blog/changes.md +++ b/module/blog/changes.md @@ -7,14 +7,14 @@ - Initialisation # version 6.22 - mise en oeuvre du helper dateUTF8 -- Réglage de l'initialisaion de la configuration +- Réglage de l'initialisation de la configuration # version 6.2 - date des commentaires # version 6.1 -- Icône RSS, lien incorrectd ans l'article. +- Icône RSS, lien incorrect dans l'article. # version 6 - mise à la norme avec le module news : le formulaire est sorti de l'écran principal - Présentation moderner de la liste des articles - Respect des balises headings - permalink des articles - - Image de couverture non obligatoire, présentation adaptive de la liste classique des articles. \ No newline at end of file + - Image de couverture non obligatoire, présentation adaptative de la liste classique des articles. \ No newline at end of file diff --git a/module/form/enum.json b/module/form/enum.json index 257baa13..62090275 100644 --- a/module/form/enum.json +++ b/module/form/enum.json @@ -1 +1 @@ -{"name":"form","realName":"Formulaire","version":"3.4","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file +{"name":"form","realName":"Formulaire","version":"3.5","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file diff --git a/module/form/form.php b/module/form/form.php index 61617bd9..bf47dfef 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -16,7 +16,7 @@ class form extends common { - const VERSION = '3.4'; + const VERSION = '3.5'; const REALNAME = 'Formulaire'; const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json) diff --git a/module/gallery/enum.json b/module/gallery/enum.json index 29a49b79..2bc512f9 100644 --- a/module/gallery/enum.json +++ b/module/gallery/enum.json @@ -1 +1 @@ -{"name":"gallery","realName":"Galerie","version":"3.7","update":"0.0","delete":true,"dataDirectory":"site\/data\/gallery\/"} \ No newline at end of file +{"name":"gallery","realName":"Galerie","version":"3.8","update":"0.0","delete":true,"dataDirectory":"site\/data\/gallery\/"} \ No newline at end of file diff --git a/module/news/enum.json b/module/news/enum.json index c5429a5e..30c0fe1b 100644 --- a/module/news/enum.json +++ b/module/news/enum.json @@ -1 +1 @@ -{"name":"news","realName":"News","version":"4.23","update":"0.0","delete":true,"dataDirectory":"site\/data\/news\/"} \ No newline at end of file +{"name":"news","realName":"News","version":"4.3","update":"0.0","delete":true,"dataDirectory":"site\/data\/news\/"} \ No newline at end of file diff --git a/module/news/news.php b/module/news/news.php index 0891c04a..764ababb 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -16,7 +16,7 @@ class news extends common { - const VERSION = '4.23'; + const VERSION = '4.3'; const REALNAME = 'News'; const DATADIRECTORY = self::DATA_DIR . 'news/'; diff --git a/module/search/changes.md b/module/search/changes.md index 989c0cc7..7afb1f91 100644 --- a/module/search/changes.md +++ b/module/search/changes.md @@ -1,8 +1,10 @@ +# Version 2.8 +- Multilingue # Version 2.71 - - Corrige le retour de $success en lecture écriture de fichier +- Corrige le retour de $success en lecture écriture de fichier # Version 2.7 - - Traduction - - Suppression du cadre de présentation des résultats - - Initialisation du module +- Traduction +- Suppression du cadre de présentation des résultats +- Initialisation du module # Version 2.6 - - Chargement de la feuille de style si présente \ No newline at end of file +- Chargement de la feuille de style si présente \ No newline at end of file diff --git a/module/search/enum.json b/module/search/enum.json index 2cb0f627..f60a0558 100644 --- a/module/search/enum.json +++ b/module/search/enum.json @@ -1 +1 @@ -{"name":"search","realName":"Recherche","version":"2.71","update":"0.0","delete":true,"dataDirectory":"site\/data\/search\/"} \ No newline at end of file +{"name":"search","realName":"Recherche","version":"2.8","update":"0.0","delete":true,"dataDirectory":"site\/data\/search\/"} \ No newline at end of file diff --git a/module/search/search.php b/module/search/search.php index b214cf3a..8a8fb0f9 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -20,7 +20,7 @@ class search extends common { - const VERSION = '2.71'; + const VERSION = '2.8'; const REALNAME = 'Recherche'; const DATADIRECTORY = self::DATA_DIR . 'search/'; From f233478ead78db001d1d123a95b04e371498776b Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 2 Feb 2023 15:30:33 +0100 Subject: [PATCH 3/4] 12201 Adaptation des modules --- module/form/changes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/form/changes.md b/module/form/changes.md index 31cb8d1e..af83ef9b 100644 --- a/module/form/changes.md +++ b/module/form/changes.md @@ -1,3 +1,5 @@ +# Version 3.5 +- Multilingue # Version 3.4 - Bug de présentation, une div en trop. # Version 3.3 From 56efada4a6b0cd6b0ecffca3e56c9c48fdfd6a06 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 2 Feb 2023 16:12:27 +0100 Subject: [PATCH 4/4] 12201 plugin JSON_UNESCAPED_UNICODE --- core/module/plugin/plugin.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/module/plugin/plugin.php b/core/module/plugin/plugin.php index 2157f836..7e9d448f 100644 --- a/core/module/plugin/plugin.php +++ b/core/module/plugin/plugin.php @@ -341,6 +341,7 @@ class plugin extends common public function store() { $store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true); + if ($store) { // Modules installés $infoModules = helper::getModules(); @@ -348,7 +349,8 @@ class plugin extends common $inPages = helper::arrayColumn($this->getData(['page']), 'moduleId', 'SORT_DESC'); foreach ($inPages as $key => $value) { $pagesInfos[$this->getData(['page', $key, 'title'])] = $value; - } + } + // Parcourir les données des modules foreach ($store as $key => $value) { // Module non installé @@ -376,12 +378,12 @@ class plugin extends common 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, 'help' => $help ]) ]; } + } // Valeurs en sortie @@ -584,7 +586,7 @@ class plugin extends common $fileName = $moduleId . $infoModule[$moduleId]['version'] . '.zip'; // Régénération du module - $success = file_put_contents(self::MODULE_DIR . $moduleId . '/enum.json', json_encode($infoModule[$moduleId])); + $success = file_put_contents(self::MODULE_DIR . $moduleId . '/enum.json', json_encode($infoModule[$moduleId], JSON_UNESCAPED_UNICODE)); // Construire l'archive $this->makeZip(self::TEMP_DIR . $fileName, self::MODULE_DIR . $moduleId); @@ -693,9 +695,9 @@ class plugin extends common $infoModule = $infoModules[$moduleId]; // Copier les données et le descripteur - $success = file_put_contents($tmpFolder . '/module.json', json_encode($moduleData)) === false ? false : true; + $success = file_put_contents($tmpFolder . '/module.json', json_encode($moduleData, JSON_UNESCAPED_UNICODE)) === false ? false : true; - $success = $success && is_int(file_put_contents($tmpFolder . '/enum.json', json_encode([$moduleId => $infoModule]))); + $success = $success && is_int(file_put_contents($tmpFolder . '/enum.json', json_encode([$moduleId => $infoModule], JSON_UNESCAPED_UNICODE))); // Le dossier du module s'il existe if (is_dir(self::DATA_DIR . $moduleId . '/' . $pageId)) { // Copier le dossier des données