diff --git a/CHANGES.md b/CHANGES.md
index ed84946e..8438dffd 100755
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,7 +1,14 @@
# Changelog
+
+## Version 10.3.11
+Modification :
+ - Message sur l'utilisation des cookies
+Coorection :
+ - Recherche inopérante dans les articles des blogs.
+
## Version 10.3.10
-Corrections :
+Corrections :
- Conflit page inactive et droit d'un membre.
- Module de recherche, correction dans les pages enfants.
- Module formulaire, perte des données en cas d'édition du fomulaire ou des champs.
diff --git a/README.md b/README.md
index 2635d8b5..54727620 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.10
+# ZwiiCMS 10.3.11
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.js.php b/core/core.js.php
index 8623d83f..be5c6b9d 100755
--- a/core/core.js.php
+++ b/core/core.js.php
@@ -221,14 +221,18 @@ core.start = function() {
/**
* Message sur l'utilisation des cookies
*/
+ var analytics = "";
+ if (getData(['config', 'analyticsId'])); ?>) {
+ analytics = ' grâce au cookie Google Analytics'
+ }
if(getData(['config', 'cookieConsent'])); ?>) {
if(document.cookie.indexOf("ZWII_COOKIE_CONSENT") === -1) {
$("body").append(
$("
").attr("id", "cookieConsent").append(
- $("
").text("En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies et de vos données de visite."),
+ $("").html("Ce site utilise des cookies pour assurer l'authentification, améliorer l'expérience utilisateur"+analytics+".
En cliquant sur ”J’accepte”, vous acceptez l’utilisation de ces cookies.
"),
$("")
.attr("id", "cookieConsentConfirm")
- .text("OK")
+ .text("Accepter")
.on("click", function() {
// Créé le cookie d'acceptation
var expires = new Date();
@@ -237,7 +241,19 @@ core.start = function() {
document.cookie = "ZWII_COOKIE_CONSENT=true;" + expires;
// Ferme le message
$(this).parents("#cookieConsent").fadeOut();
- })
+ }),
+ $("")
+ .attr("id", "cookieConsentRefuse")
+ .text("Refuser")
+ .on("click", function() {
+ // Créé le cookie d'acceptation
+ var expires = new Date();
+ expires.setFullYear(expires.getFullYear() + 1);
+ expires = "expires=" + expires.toUTCString();
+ document.cookie = "ZWII_COOKIE_CONSENT=false;" + expires;
+ // Ferme le message
+ $(this).parents("#cookieConsent").fadeOut();
+ }),
)
);
}
diff --git a/core/core.php b/core/core.php
index 4bb5a593..a07291f3 100755
--- 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.10';
+ const ZWII_VERSION = '10.3.11';
const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = [];
@@ -1845,9 +1845,9 @@ class core extends common {
}
// Empêcher l'accès aux page désactivée par URL directe
if ( ( $this->getData(['page', $this->getUrl(0),'disable']) === true
- AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
- ) OR (
- $this->getData(['page', $this->getUrl(0),'disable']) === true
+ AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
+ ) OR (
+ $this->getData(['page', $this->getUrl(0),'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
@@ -2196,14 +2196,15 @@ class layout extends common {
* Affiche le script Google Analytics
*/
public function showAnalytics() {
- if($code = $this->getData(['config', 'analyticsId'])) {
+ if($code = $this->getData(['config', 'analyticsId'])
+ AND $this->getInput('ZWII_COOKIE_CONSENT') === 'true') {
echo '
';
}
}
@@ -2442,9 +2443,9 @@ class layout extends common {
$itemsLeft .= '';
if ( ( $this->getData(['page',$parentPageId,'disable']) === true
- AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
- ) OR (
- $this->getData(['page',$parentPageId,'disable']) === true
+ AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
+ ) OR (
+ $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
@@ -2502,9 +2503,9 @@ class layout extends common {
// Mise en page du sous-item
$itemsLeft .= '';
if ( ( $this->getData(['page',$childKey,'disable']) === true
- AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
- ) OR (
- $this->getData(['page',$childKey,'disable']) === true
+ AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
+ ) OR (
+ $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
diff --git a/core/layout/common.css b/core/layout/common.css
index b0307fdb..651c8406 100755
--- a/core/layout/common.css
+++ b/core/layout/common.css
@@ -835,31 +835,35 @@ footer #footerSocials .zwiico-github:hover {
background: rgba(33, 34, 35, 1);
}
-/* Message sur les cookies */
-#cookieConsent {
- opacity: .9;
- background: #212223;
- position: fixed;
- right: 0;
- bottom: 0;
- left: 0;
- color: #FFF;
- padding: 10px;
- z-index: 60;
- text-align: center;
- font-size: .9em;
-}
-#cookieConsentConfirm {
- cursor: pointer;
- margin-left: 10px;
- background: #666;
- padding: 4px 8px;
- display: inline-block;
- transition: background .3s ease-out;
-}
-#cookieConsentConfirm:hover {
- background: #777;
-}
+ /* Message sur les cookies */
+ #cookieConsent {
+ width: 80%;
+ margin: auto;
+ opacity: .9;
+ background: #212223;
+ position: fixed;
+ right: 0;
+ bottom: 5%;
+ left: 0;
+ color: #FFF;
+ padding: 10px;
+ z-index: 60;
+ text-align: center;
+ font-size: 1em;
+ }
+
+ #cookieConsentConfirm, #cookieConsentRefuse {
+ cursor: pointer;
+ margin-left: 10px;
+ background: #666;
+ padding: 4px 8px;
+ display: inline-block;
+ transition: background .3s ease-out;
+ }
+
+ #cookieConsentConfirm:hover, #cookieConsentRefuse:hover {
+ background: #777;
+ }
/* Bloc */
.block {
diff --git a/module/search/search.php b/module/search/search.php
index 49fe78d6..b2a41f07 100755
--- a/module/search/search.php
+++ b/module/search/search.php
@@ -126,8 +126,8 @@ class search extends common {
foreach($childIds as $childId) {
// Sous page
if ($this->getData(['page', $childId, 'disable']) === false &&
- $this->getUser('group') >= $this->getData(['page', $childId, 'group']) &&
- $this->getData(['page', $childId, 'block']) !== 'bar') {
+ $this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
+ $this->getData(['page', $parentId, 'block']) !== 'bar') {
$url = $childId;
$titre = $this->getData(['page', $childId, 'title']);
$contenu = ' ' . $titre . ' ' . $this->getData(['page', $childId, 'content']);