From 52b10d1382dd598ddb6ece60a9482cdba73d9e76 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 2 Apr 2021 11:16:44 +0200 Subject: [PATCH 1/2] 10502 Erreur de marge --- CHANGES.md | 4 ++++ README.md | 2 +- core/core.php | 14 +++++++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 559165c0..b0a07f98 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## version 10.5.02 +- Correction : + - Erreur de positionnement de marge dans le thème du site. + ## 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. diff --git a/README.md b/README.md index d16f7837..45e8d589 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# ZwiiCMS 10.5.01 +# ZwiiCMS 10.5.02 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 2fd1f768..3ae75036 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.01'; + const ZWII_VERSION = '10.5.02'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; @@ -1577,9 +1577,13 @@ class common { $this->setData(['core', 'dataVersion', 10400]); } - // Version 10.4.05 - if ($this->getData(['core', 'dataVersion']) < 10405) { - $this->setData(['core', 'dataVersion', 10405]); + // Version 10.5.02 + if ($this->getData(['core', 'dataVersion']) < 10502) { + // Forcer la régénération du thème + if (file_exists(self::DATA_DIR.'theme.css')) { + unlink (self::DATA_DIR.'theme.css'); + } + $this->setData(['core', 'dataVersion', 10502]); } } } @@ -1706,7 +1710,7 @@ class core extends common { $marginBottomLarge = $margin; } $css .= $this->getData(['theme', 'site', 'width']) === '100%' - ? '@media (min-width: 769px) {#site{margin:0 auto 0 ' . $marginBottomLarge . ' !important;}}@media (max-width: 768px) {#site{margin:0 auto 0 ' . $marginBottomSmall . ' !important;}}#site.light{margin:5% auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}' + ? '@media (min-width: 769px) {#site{margin:0 auto ' . $marginBottomLarge . ' 0 !important;}}@media (max-width: 768px) {#site{margin:0 auto ' . $marginBottomSmall . ' 0 !important;}}#site.light{margin:5% auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}' : '@media (min-width: 769px) {#site{margin: ' . $margin . ' auto ' . $marginBottomLarge . ' auto !important;}}@media (max-width: 768px) {#site{margin: ' . $margin . ' auto ' . $marginBottomSmall . ' auto !important;}}#site.light{margin: 5% auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} '; $css .= $this->getData(['theme', 'site', 'width']) === '750px' ? '.button, button{font-size:0.8em;}' From ef75ce3b2816e0fe842caf7248562e2208fec439 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 2 Apr 2021 15:24:30 +0200 Subject: [PATCH 2/2] RSS syntaxe erreur --- CHANGES.md | 3 +- module/blog/view/article/article.php | 2 +- module/blog/view/index/index.php | 2 +- module/download/view/index/index.php | 67 +++++++++ module/download/view/item/item.php | 211 +++++++++++++++++++++++++++ module/news/view/article/article.php | 43 ++++++ module/news/view/index/index.php | 2 +- 7 files changed, 326 insertions(+), 4 deletions(-) create mode 100644 module/download/view/index/index.php create mode 100644 module/download/view/item/item.php create mode 100644 module/news/view/article/article.php diff --git a/CHANGES.md b/CHANGES.md index b0a07f98..480b46a3 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,9 @@ # Changelog ## version 10.5.02 -- Correction : +- Corrections : - Erreur de positionnement de marge dans le thème du site. + - Erreur de syntaxe html dans les liens des flux RSS. S'ouvrent désormais dans un nouvel onglet. ## version 10.5.01 - Modifications : diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index 62263c9a..98cafbac 100755 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -53,7 +53,7 @@ getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
- + ' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '

' ; diff --git a/module/blog/view/index/index.php b/module/blog/view/index/index.php index 7beeb709..319d7a54 100755 --- a/module/blog/view/index/index.php +++ b/module/blog/view/index/index.php @@ -52,7 +52,7 @@ getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
- + ' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '

' ; diff --git a/module/download/view/index/index.php b/module/download/view/index/index.php new file mode 100644 index 00000000..c177964e --- /dev/null +++ b/module/download/view/index/index.php @@ -0,0 +1,67 @@ + +
+ + getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?> + + + + + \ No newline at end of file diff --git a/module/download/view/item/item.php b/module/download/view/item/item.php new file mode 100644 index 00000000..e66f16ee --- /dev/null +++ b/module/download/view/item/item.php @@ -0,0 +1,211 @@ +
+
+
+
+ getData(['module', $this->getUrl(0),'items', $this->getUrl(1), 'content']); ?> +
+
+
+
+ + + getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn']))); + $heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn']))); + echo $date . ' à ' . $heure; + ?> + + + getUser('password') === $this->getInput('ZWII_USER_PASSWORD') + AND + ( // Propriétaire + ( + $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER + AND ( $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1),'userId']) === $this->getUser('id') + OR $this->getUser('group') === self::GROUP_ADMIN ) + ) + OR ( + // Groupe + ( $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN + OR $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1),'editConsent']) === self::GROUP_MODERATOR) + AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'items', $this->getUrl(1),'editConsent']) + ) + OR ( + // Tout le monde + $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL + AND $this->getUser('group') >= $module::$actions['config'] + ) + ) + ): ?> + + Editer + + + + getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?> + + +
+
+
+
+
+
+ getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'pictureSize']); ?> + getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'picture']) . + '" alt="' . $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'picture']) . '">'; + ?> +
+
+
+
+ self::FILE_DIR . 'source/' . $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'file']), + 'href' => helper::baseUrl() . $this->getUrl(0) . '/downloadFile/' . $this->getUrl(1) . '/' . $_SESSION['csrf'], + 'value' => 'Télécharger' + ]); ?> +
+
+
+
+ getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'fileVersion']); ?> +
+
+
+
+ getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'fileDate'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'fileDate'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'fileDate']))); + ?> + +
+
+
+
+ Auteur : + getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'fileAuthor']); ?> + +
+
+
+
+ Licence : + getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'fileLicense'])]; ?> + +
+
+
+
+ Téléchargements : + + +
+
+
+
+ +
+
+ getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'commentClose'])): ?> +

Cet item ne reçoit pas de commentaire.

+ +

+ + + + 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?> +

+ + 'Rédiger un commentaire...', + 'readonly' => true + ]); ?> +
+ getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?> + 'Nom', + 'readonly' => true, + 'value' => $module::$editCommentSignature + ]); ?> + $this->getUser('id') + ]); ?> + +
+
+ 'Nom' + ]); ?> +
+
+
Ou
+
+
+ helper::baseUrl() . 'user/login/' . str_replace('/', '_', $this->getUrl()) . '__comment', + 'value' => 'Connexion' + ]); ?> +
+
+ + 'Commentaire avec maximum '.$this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'commentMaxlength']).' caractères', + 'class' => 'editorWysiwygComment', + 'noDirty' => true, + 'maxlength' => $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'commentMaxlength']) + ]); ?> +
+ getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?> +
+
+ $this->getData(['config','captchaStrong']) + ]); ?> +
+
+ +
+
+ 'buttonGrey', + 'value' => 'Annuler' + ]); ?> +
+
+ 'Envoyer', + 'ico' => '' + ]); ?> +
+
+
+ +
+
+ $comment): ?> +
+

+ le + +

+ +
+
+
+
+ \ No newline at end of file diff --git a/module/news/view/article/article.php b/module/news/view/article/article.php new file mode 100644 index 00000000..117e61d7 --- /dev/null +++ b/module/news/view/article/article.php @@ -0,0 +1,43 @@ +
+
+ getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?> +
+
+
+
+ + + + getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))); + $heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))); + echo $date . ' à ' . $heure; + ?> + + getUser('password') === $this->getInput('ZWII_USER_PASSWORD') + AND + ( // Propriétaire + ( $this->getUser('group') === self::GROUP_ADMIN ) + ) + ): ?> + + Editer + + + + getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?> + + +
+
\ No newline at end of file diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php index 084b370f..11c6150d 100755 --- a/module/news/view/index/index.php +++ b/module/news/view/index/index.php @@ -38,7 +38,7 @@ getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>