From 9c9bea68de5f74a7e3f958624a64c56c3057d0a9 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 21 Mar 2021 14:12:32 +0100 Subject: [PATCH 01/16] =?UTF-8?q?rechargement=20common.css=20et=20jeu=20d'?= =?UTF-8?q?ic=C3=B4nes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 ++++ core/core.php | 10 +++++++--- core/layout/main.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b0f2a8af..69d8fd08 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## version 10.5.00 +- Modifications : + - Rechargement du fichier common.css après une mise à jour. + ## version 10.5.00 **A partir de cette version, les versions de php inférieures à 7.2 ne sont plus supportées.** - Nouveauté : diff --git a/core/core.php b/core/core.php index 4ab4c009..2a4ea9fa 100755 --- a/core/core.php +++ b/core/core.php @@ -44,7 +44,7 @@ class common { const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '10.5.00'; + const ZWII_VERSION = '10.5.01'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; @@ -2423,7 +2423,7 @@ class layout extends common { $items .= 'getData(['theme','footer','displayLegal']) === false ? ' class="displayNone" >' : '>'; if ($this->getData(['locale','legalPageId']) !== 'none') { - $items .= ' | Mentions légales'; + $items .= ' | Mentions légales'; } $items .= ''; // Affichage du lien de connexion @@ -3011,7 +3011,11 @@ class layout extends common { foreach($vendorFiles as $vendorFile) { switch(pathinfo($vendorFile, PATHINFO_EXTENSION)) { case 'css': - echo ''; + // Force le rechargement lors d'une mise à jour du jeu d'icônes + $reload = $vendorPath === 'core/vendor/zwiico/' + ? '?' . md5_file('core/vendor/zwiico/css/zwiico-codes.css') + : ''; + echo ''; break; case 'js': echo ''; diff --git a/core/layout/main.php b/core/layout/main.php index 1f19cbc4..6e10f387 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -11,7 +11,7 @@ showFavicon(); ?> showVendor(); ?> showAnalytics(); ?> - + From 2c087edd85a95c6e4d4d822200b3a521fc5ad0e6 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 21 Mar 2021 14:18:33 +0100 Subject: [PATCH 02/16] changes --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 69d8fd08..2bfe1d00 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ ## version 10.5.00 - Modifications : - - Rechargement du fichier common.css après une mise à jour. + - Rechargement du fichier de style common.css et du jeu d'icônes du système après une mise à jour. ## version 10.5.00 **A partir de cette version, les versions de php inférieures à 7.2 ne sont plus supportées.** From 6e3647909b2da2a35da2cbafe73a11056628d854 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 21 Mar 2021 14:43:44 +0100 Subject: [PATCH 03/16] signature dans le module news --- module/news/news.php | 3 ++- module/news/view/index/index.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/news/news.php b/module/news/news.php index 79a491f3..b3896b31 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -15,7 +15,7 @@ class news extends common { - const VERSION = '2.2'; + const VERSION = '2.3'; const REALNAME = 'Actualités'; const DELETE = true; const UPDATE = '0.0'; @@ -304,6 +304,7 @@ class news extends common { // News en fonction de la pagination for($i = $pagination['first']; $i < $pagination['last']; $i++) { self::$news[$newsIds[$i]] = $this->getData(['module', $this->getUrl(0),'posts', $newsIds[$i]]); + self::$news[$newsIds[$i]]['userId'] = $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'userId'])); } // Valeurs en sortie $this->addOutput([ diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php index f0385673..084b370f 100755 --- a/module/news/view/index/index.php +++ b/module/news/view/index/index.php @@ -15,10 +15,10 @@ - - getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?> + - getUser('password') === $this->getInput('ZWII_USER_PASSWORD') AND ( // Propriétaire @@ -40,7 +40,7 @@
- ' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '

' ; ?>
From 7a4cc0c651d8ae83dab962746941fa6dfd25e7cc Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 21 Mar 2021 14:49:04 +0100 Subject: [PATCH 04/16] changes --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 2bfe1d00..2d23f4c7 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## version 10.5.00 - Modifications : - Rechargement du fichier de style common.css et du jeu d'icônes du système après une mise à jour. + - News 2.3 : ajout de la signature du rédacteur dans le module news (actualités, idem module blog) ## version 10.5.00 **A partir de cette version, les versions de php inférieures à 7.2 ne sont plus supportées.** From f4c764e2f60badf3ed9adf1afe1599d47e0dc5f1 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 21 Mar 2021 14:49:53 +0100 Subject: [PATCH 05/16] =?UTF-8?q?num=C3=A9ro=20de=20version=20dans=20chang?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 2d23f4c7..36c9e528 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # Changelog -## version 10.5.00 +## version 10.5.01 - Modifications : - Rechargement du fichier de style common.css et du jeu d'icônes du système après une mise à jour. - News 2.3 : ajout de la signature du rédacteur dans le module news (actualités, idem module blog) From 6a27eb440b099677ee64bbcb2e14dfa7558b6f5d Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 21 Mar 2021 14:50:01 +0100 Subject: [PATCH 06/16] version changes --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 36c9e528..c2153881 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ # Changelog ## version 10.5.01 -- Modifications : +- Modifications : - Rechargement du fichier de style common.css et du jeu d'icônes du système après une mise à jour. - News 2.3 : ajout de la signature du rédacteur dans le module news (actualités, idem module blog) From 1199a67ed69d1cebfbe6077432c53a5fd12a0983 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 21 Mar 2021 18:12:25 +0100 Subject: [PATCH 07/16] backup date filename --- core/class/helper.class.php | 2 +- core/module/theme/theme.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/class/helper.class.php b/core/class/helper.class.php index b3381e8c..dd743f11 100755 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -108,7 +108,7 @@ class helper { // Creation du ZIP $baseName = str_replace('/','',helper::baseUrl(false,false)); $baseName = empty($baseName) ? 'ZwiiCMS' : $baseName; - $fileName = $baseName . '-backup-' . date('Y-m-d-h-i-s', time()) . '.zip'; + $fileName = $baseName . '-backup-' . date('Y-m-d-H-i-s', time()) . '.zip'; $zip = new ZipArchive(); $zip->open($folder . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE); $directory = 'site/'; diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 8cb8b382..8d0d1817 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -774,7 +774,7 @@ class theme extends common { */ private function zipTheme($modele) { // Creation du dossier - $zipFilename = $modele . ' ' .date('d m Y').' '.date('H i s ').'.zip'; + $zipFilename = $modele . date('Y-m-d-H-i-s', time()) . '.zip'; $zip = new ZipArchive(); if ($zip->open(self::TEMP_DIR . $zipFilename, ZipArchive::CREATE | ZipArchive::OVERWRITE ) === TRUE) { switch ($modele) { From f38f7ce547f59d0598a31ccbe8633ce8ad10e1bb Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 22 Mar 2021 11:02:29 +0100 Subject: [PATCH 08/16] =?UTF-8?q?Bug=20:=20titre=20de=20page=20de=20mainte?= =?UTF-8?q?nance=20non=20cach=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/maintenance/maintenance.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/module/maintenance/maintenance.php b/core/module/maintenance/maintenance.php index 9987e803..d7832c8c 100755 --- a/core/module/maintenance/maintenance.php +++ b/core/module/maintenance/maintenance.php @@ -33,7 +33,9 @@ class maintenance extends common { AND $this->getData(['page',$this->getData(['locale','page302'])]) ) { $this->addOutput([ 'display' => self::DISPLAY_LAYOUT_LIGHT, - 'title' => $this->getData(['page',$this->getData(['locale','page302']),'title']), + 'title' => $this->getData(['page',$this->getData(['locale','page302']),'hideTitle']) + ? '' + : $this->getData(['page',$this->getData(['locale','page302']),'title']), 'content' => $this->getdata(['page',$this->getData(['locale','page302']),'content']), 'view' => 'index' ]); From 8a7919cf6b08300e168ae26862766d5bf89710bf Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 22 Mar 2021 11:06:43 +0100 Subject: [PATCH 09/16] changes bug titre maintenance --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c2153881..16e83565 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,8 @@ - Modifications : - Rechargement du fichier de style common.css et du jeu d'icônes du système après une mise à jour. - News 2.3 : ajout de la signature du rédacteur dans le module news (actualités, idem module blog) +Corrections : + - Mode maintenance, titre non masqué d'une page personnalisée. ## version 10.5.00 **A partir de cette version, les versions de php inférieures à 7.2 ne sont plus supportées.** From fed8fb6ab198c309920fc7a1cf05d1f01fa553a8 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 22 Mar 2021 11:30:34 +0100 Subject: [PATCH 10/16] =?UTF-8?q?Bug=20d=C3=A9placement=20menu=20=C3=A0=20?= =?UTF-8?q?valider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/theme.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 8d0d1817..b9589ca6 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -424,17 +424,20 @@ class theme extends common { 'imageContainer' => $this->getInput('themeHeaderImageContainer') ]]); // Modification de la position du menu selon la position de la bannière - switch ($this->getInput('themeHeaderPosition') && - $this->getData(['theme','menu','position']) !== 'site' && - $this->getData(['theme','menu','position']) !== 'top' ) { - case 'site' : - $position = str_replace ('body','site',$this->getData(['theme','menu','position'])); - break; - case 'body' : - $position = str_replace ('site','body',$this->getData(['theme','menu','position'])); - break; - default: - $position = $this->getData(['theme','menu','position']); + if ( $this->getInput('themeHeaderPosition') && + $this->getData(['theme','menu','position']) !== 'site' && + $this->getData(['theme','menu','position']) !== 'top' ) + { + switch ($this->getInput('themeHeaderPosition')) { + case 'site' : + $position = str_replace ('body','site',$this->getData(['theme','menu','position'])); + break; + case 'body' : + $position = str_replace ('site','body',$this->getData(['theme','menu','position'])); + break; + default: + $position = $this->getData(['theme','menu','position']); + } } $this->setData(['theme', 'menu', [ From 0cb9de7b8e47f940c732ec3ed78edd4e9c55092a Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 22 Mar 2021 13:39:24 +0100 Subject: [PATCH 11/16] =?UTF-8?q?bug=20position=20du=20menu=20par=20rappor?= =?UTF-8?q?t=20=C3=A0=20la=20banni=C3=A8re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index b9589ca6..3dae5e3b 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -425,8 +425,8 @@ class theme extends common { ]]); // Modification de la position du menu selon la position de la bannière if ( $this->getInput('themeHeaderPosition') && - $this->getData(['theme','menu','position']) !== 'site' && - $this->getData(['theme','menu','position']) !== 'top' ) + ( $this->getData(['theme','menu','position']) !== 'site' || + $this->getData(['theme','menu','position']) !== 'top') ) { switch ($this->getInput('themeHeaderPosition')) { case 'site' : From 0512fd914f6f8fd3d155ad7470e39e04874e829b Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 22 Mar 2021 16:09:12 +0100 Subject: [PATCH 12/16] =?UTF-8?q?Aper=C3=A7u=20Menu=20position=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/view/header/header.js.php | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 3669bcb8..ccae21bf 100755 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -132,6 +132,40 @@ $("input, select").on("change", function() { } break; } + // Position dynamique du menu placé par rapport à la bannière + var menuPosition = getData(['theme', 'menu', 'position'])); ?>; + if ( menuPosition !== 'site' || + menuPosition !== 'top') { + switch(menuPosition) { + case 'site-first': + $("nav").show().prependTo("#site"); + break; + case 'site-second': + if(getData(['theme', 'header', 'position']) === 'site'); ?>) { + $("nav").show().insertAfter("header"); + } + else { + $("nav").show().prependTo("#site"); + } + break; + case 'body-first': + $("nav").show().insertAfter("#bar"); + $("#menu").removeClass('container-large'); + $("nav").removeAttr('id'); + $("#menu").addClass('container'); + break; + case 'body-second': + if(getData(['theme', 'header', 'position']) === 'body'); ?>) { + $("nav").show().insertAfter("header"); + } + else { + $("nav").show().insertAfter("#bar"); + } + $("nav").removeAttr('id'); + break; + } + + } // Ajout du css au DOM $("#themePreview").remove(); From 6c893e43330afc7ef9e1efcd8e07d3c43d419d41 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 22 Mar 2021 17:18:46 +0100 Subject: [PATCH 13/16] fix menu.js.php --- core/module/theme/view/menu/menu.js.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/core/module/theme/view/menu/menu.js.php b/core/module/theme/view/menu/menu.js.php index bb1632c5..a7ecc86d 100755 --- a/core/module/theme/view/menu/menu.js.php +++ b/core/module/theme/view/menu/menu.js.php @@ -79,15 +79,7 @@ $("input, select").on("change", function() { ) { css += 'nav{padding:0 10px;}'; } - - // Ajout du css au DOM - $("#themePreview").remove(); - $("