From b06f855ffc7a5d77a2ce8bc219f601f4b879f388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Fri, 10 Jun 2022 18:01:55 +0200 Subject: [PATCH 1/6] =?UTF-8?q?11504=20bug=20du=20s=C3=A9lecteur=20de=20mo?= =?UTF-8?q?dule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 5 +++++ README.md | 2 +- core/module/page/view/edit/edit.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a46c13b5..43e3ecdf 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # Changelog +< +## Version 11.5.04 +### Corrections : +- Bug de sélection d'un module absent. + ## Version 11.5.03 ### Correction : - Bug de la génération des feuilles de style des fontes, nouvelle correction. diff --git a/README.md b/README.md index 98f893ea..dce10f59 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ZwiiCMS 11.5.03 +# ZwiiCMS 11.5.04 Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation. diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index c03c1b26..c3fe899c 100644 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -71,7 +71,7 @@ 'En cas de changement de module, les données du module précédent seront supprimées.', 'label' => 'Module', - 'selected' => class_exists($this->getData(['page', $this->getUrl(2), 'moduleId'])) ? $this->getData(['page', $this->getUrl(2), 'moduleId']) : 0 + 'selected' => class_exists($this->getData(['page', $this->getUrl(2), 'moduleId'])) ? $this->getData(['page', $this->getUrl(2), 'moduleId']) : '' ]); ?> $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?> Date: Fri, 10 Jun 2022 18:15:49 +0200 Subject: [PATCH 2/6] 11504 Bug dans le module de recherche --- CHANGES.md | 3 ++- module/search/search.php | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 43e3ecdf..d53ed779 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,8 @@ < ## Version 11.5.04 ### Corrections : -- Bug de sélection d'un module absent. +- Edition d'une page : bug de sélection d'un module absent. +- Rechercher dans le site : impossiblilité de rechercher dans le contenu des moduless (news, blog et download). ## Version 11.5.03 ### Correction : diff --git a/module/search/search.php b/module/search/search.php index 0c46699f..45ae858d 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -254,7 +254,7 @@ class search extends common { } // Articles d'une sous-page blog ou de news - if ( $this->getData([ 'module', $childId, 'posts', 'content']) + if ( $this->getData([ 'module', $childId, 'posts']) ) { foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) { if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) { @@ -272,8 +272,8 @@ class search extends common { } // Articles d'un blog ou de news - if ( $this->getData([ 'module', $parentId, 'posts', 'content']) - ) { + if ( $this->getData([ 'module', $parentId, 'posts']) + ) { foreach($this->getData(['module',$parentId,'posts']) as $articleId => $article) { if($this->getData(['module',$parentId,'posts',$articleId,'state']) === true) @@ -289,7 +289,6 @@ class search extends common { } } } - // Message de synthèse de la recherche if (count($result) === 0) { self::$resultTitle = 'Aucun résultat'; From 4716733c3482d3156e149117b6b2c389a28147e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Fri, 10 Jun 2022 18:40:55 +0200 Subject: [PATCH 3/6] =?UTF-8?q?11504=20G=C3=A9n=C3=A9ration=20de=20la=20ca?= =?UTF-8?q?pture=20d'=C3=A9cran=20du=20site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/config/config.php | 14 ++++++++++++-- core/module/config/view/social/social.php | 1 - 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/core/module/config/config.php b/core/module/config/config.php index 68604856..cfffb148 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -257,8 +257,18 @@ class config extends common { $site = 'https://zwiicms.fr/'; } else { $site = helper::baseUrl(false); } - $success= false; - $googlePagespeedData = helper::getUrlContents('https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url='. $site .'&screenshot=true'); + // Succès de la'opération par défaut + $success = false; + + // Tente de connecter 5 fois l'API Google + for ($i=0; $i < 5 ; $i++) { + $googlePagespeedData = helper::getUrlContents('https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url='. $site .'&screenshot=true'); + if ($googlePagespeedData !== false) { + break; + } + } + + // Traitement des données reçues valides. if ($googlePagespeedData !== false) { $googlePagespeedData = json_decode($googlePagespeedData, true); $data = str_replace('_','/',$googlePagespeedData['lighthouseResult']['audits']['final-screenshot']['details']['data']); diff --git a/core/module/config/view/social/social.php b/core/module/config/view/social/social.php index 5ce5469f..13d4de7c 100644 --- a/core/module/config/view/social/social.php +++ b/core/module/config/view/social/social.php @@ -16,7 +16,6 @@ helper::baseUrl() . 'config/configMetaImage', 'value' => 'Générer une capture Open Graph' - ]); ?> From 67aea648eb4dbab697335c3a6d6d1ae1b2c4bf5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Fri, 10 Jun 2022 18:44:29 +0200 Subject: [PATCH 4/6] 11504 bug API Google --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index d53ed779..96fdc315 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ ### Corrections : - Edition d'une page : bug de sélection d'un module absent. - Rechercher dans le site : impossiblilité de rechercher dans le contenu des moduless (news, blog et download). +### Amélioration : +- Récupération de la capture d'écran du site, 5 tentatives d'appels de l'API Google sont effectuées avant de retourner un échec. ## Version 11.5.03 ### Correction : From 9faea02ac3c8267932550eb6c96d0652f2bead37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Sat, 11 Jun 2022 17:44:44 +0200 Subject: [PATCH 5/6] typos --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 96fdc315..5fe45439 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,8 +3,8 @@ < ## Version 11.5.04 ### Corrections : -- Edition d'une page : bug de sélection d'un module absent. -- Rechercher dans le site : impossiblilité de rechercher dans le contenu des moduless (news, blog et download). +- Édition d'une page : bug de sélection d'un module absent. +- Rechercher dans le site : impossibilité de rechercher dans le contenu des modules (news, blog et download). ### Amélioration : - Récupération de la capture d'écran du site, 5 tentatives d'appels de l'API Google sont effectuées avant de retourner un échec. From 4f44c8e81781be1364ac5fa871dee9fe57caeebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Sun, 12 Jun 2022 15:14:24 +0200 Subject: [PATCH 6/6] Version du core --- core/core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core.php b/core/core.php index a626e41c..7351756c 100644 --- a/core/core.php +++ b/core/core.php @@ -45,7 +45,7 @@ class common { // Numéro de version const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; - const ZWII_VERSION = '11.5.03'; + const ZWII_VERSION = '11.5.04'; const ZWII_UPDATE_CHANNEL = "v11"; public static $actions = [];