From 0f12d2e3f08b8e0a0da1119c24c82ce725870835 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 18 Nov 2020 16:20:45 +0100 Subject: [PATCH 1/3] merge fix WIP --- core/core.php | 18 +++++++++--------- module/blog/blog.php | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/core.php b/core/core.php index 3b0a6312..0c8d4eb5 100644 --- a/core/core.php +++ b/core/core.php @@ -1483,24 +1483,24 @@ class common { foreach ($pageList as $parentKey => $parent) { //La page a une galerie if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) { - $articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent]), 'publishedOn', 'SORT_DESC')); + $articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent,'posts']), 'publishedOn', 'SORT_DESC')); foreach ($articleIds as $key => $article) { // Droits les deux groupes - $this->setData(['module', $parent, $article,'editConsent', 3]); + $this->setData(['module', $parent, 'posts', $article,'editConsent', 3]); // Limite de taille 500 - $this->setData(['module', $parent, $article,'commentMaxlength', '500']); + $this->setData(['module', $parent, 'posts', $article,'commentMaxlength', '500']); // Pas d'approbation des commentaires - $this->setData(['module', $parent, $article,'commentApproved', false ]); + $this->setData(['module', $parent, 'posts', $article,'commentApproved', false ]); // pas de notification - $this->setData(['module', $parent, $article,'commentNotification', false ]); + $this->setData(['module', $parent, 'posts', $article,'commentNotification', false ]); // groupe de notification - $this->setData(['module', $parent, $article,'commentGroupNotification', 3 ]); + $this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]); } // Traitement des commentaires - if ( is_array($this->getData(['module', $parent, $article,'comment'])) ) { - foreach($this->getData(['module', $parent, $article,'comment']) as $commentId => $comment) { + if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) { + foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) { // Approbation - $this->setData(['module', $parent, $article,'comment', $commentId, 'approval', true ]); + $this->setData(['module', $parent, 'posts', $article,'comment', $commentId, 'approval', true ]); } } } diff --git a/module/blog/blog.php b/module/blog/blog.php index 9644febd..f49108a9 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -152,7 +152,7 @@ class blog extends common { } // Incrémente l'id de l'article $articleId = helper::increment($this->getInput('blogAddTitle', helper::FILTER_ID), $this->getData(['page'])); - $articleId = helper::increment($articleId, (array) $this->getData(['module', $this->getUrl(0)])); + $articleId = helper::increment($articleId, (array) $this->getData(['module', $this->getUrl(0),'posts'])); $articleId = helper::increment($articleId, array_keys(self::$actions)); // Crée l'article $this->setData(['module', @@ -354,7 +354,7 @@ class blog extends common { */ public function config() { // Ids des articles par ordre de publication - $articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0)]), 'publishedOn', 'SORT_DESC')); + $articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0),'posts']), 'publishedOn', 'SORT_DESC')); // Gestion des droits d'accès $filterData=[]; foreach ($articleIds as $key => $value) { From 944067a134f3a7d147aa01aceea4e4efd268335d Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 18 Nov 2020 16:34:07 +0100 Subject: [PATCH 2/3] =?UTF-8?q?commenaire=20=C3=A0=20l'installation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 ++++ README.md | 2 +- core/core.php | 4 ++-- core/module/install/install.php | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e4e3cfd6..1c91275b 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## version 10.3.07 +- Corrections : + - installation, auteurs des articles gérés à l'installation. + ## version 10.3.06 - Correction : - Edition de page avec module, le changement de mise en page désactive le bouton d'option du module. diff --git a/README.md b/README.md index a3ae516d..41bece89 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![](https://img.shields.io/github/last-commit/fredtempez/ZwiiCMS/master) ![](https://img.shields.io/github/release-date/fredtempez/ZwiiCMS) -# ZwiiCMS 10.3.06 +# ZwiiCMS 10.3.07 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/core.php b/core/core.php index 46ae9324..6d6edead 100644 --- a/core/core.php +++ b/core/core.php @@ -1462,7 +1462,7 @@ class common { } // Mettre à jour les données des blogs les articles sont dans posts foreach ($pageList as $parentKey => $parent) { - //La page a une galerie + //La page a une blog if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) { foreach ( $this->getData(['module', $parent]) as $blogKey => $blogItem) { $data = $this->getdata(['module',$parent,$blogKey]); @@ -1472,7 +1472,7 @@ class common { } } foreach ($pageList as $parentKey => $parent) { - //La page a une galerie + //La page a une news if ($this->getData(['page',$parent,'moduleId']) === 'news' ) { foreach ( $this->getData(['module', $parent]) as $newsKey => $newsItem) { $data = $this->getdata(['module',$parent,$newsKey]); diff --git a/core/module/install/install.php b/core/module/install/install.php index 7dfdf89f..c27cb143 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -94,9 +94,9 @@ class install extends common { if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) { $this->initData('page','fr',true); $this->initData('module','fr',true); - $this->setData(['module', 'blog', 'mon-premier-article', 'userId', $userId]); - $this->setData(['module', 'blog', 'mon-deuxieme-article', 'userId', $userId]); - $this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]); + $this->setData(['module', 'blog', 'posts', 'mon-premier-article', 'userId', $userId]); + $this->setData(['module', 'blog', 'posts', 'mon-deuxieme-article', 'userId', $userId]); + $this->setData(['module', 'blog', 'posts', 'mon-troisieme-article', 'userId', $userId]); } // Stocker le dossier d'installation $this->setData(['core', 'baseUrl', helper::baseUrl(false,false) ]); From bb5d884aeefee70ce66630e054881113bd6efab5 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 18 Nov 2020 16:41:28 +0100 Subject: [PATCH 3/3] TinyMCE Format select --- CHANGES.md | 6 ++++-- core/core.php | 2 +- core/vendor/tinymce/init.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1c91275b..e341a4d5 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,13 +1,15 @@ # Changelog ## version 10.3.07 -- Corrections : +- Corrections : - installation, auteurs des articles gérés à l'installation. +- Modification : + - TinyMCE : icône du sélecteur de formats. ## version 10.3.06 - Correction : - Edition de page avec module, le changement de mise en page désactive le bouton d'option du module. -- Modification : +- Modification : - Modules News et Blog : ajout de l'option flux RSS. L'option est activée par défaut. ## version 10.3.05 diff --git a/core/core.php b/core/core.php index 6d6edead..3fda6845 100644 --- a/core/core.php +++ b/core/core.php @@ -40,7 +40,7 @@ class common { const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '10.3.06'; + const ZWII_VERSION = '10.3.07'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; diff --git a/core/vendor/tinymce/init.js b/core/vendor/tinymce/init.js index fafb074b..05e9774a 100755 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -20,7 +20,7 @@ tinymce.init({ // Plugins plugins: "advlist anchor autolink autoresize autosave codemirror colorpicker contextmenu fullscreen hr image imagetools link lists media paste searchreplace stickytoolbar tabfocus table template textcolor emoticons nonbreaking", // Contenu de la barre d'outils - toolbar: "restoredraft | undo redo | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist emoticons | table template | image media link | code fullscreen", + toolbar: "restoredraft | undo redo | formatselect | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist emoticons | table template | image media link | code fullscreen", // Emoticons emoticons_append: { custom_mind_explode: {