From 1e76d58f7e5a63e0bf20f777087bf49d833bd435 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 1 Dec 2020 18:29:58 +0100 Subject: [PATCH] =?UTF-8?q?Bug=20page=20priv=C3=A9e=20et=20d=C3=A9sactiv?= =?UTF-8?q?=C3=A9e=20+=20bug=20module=20de=20recherche=20groupes=20pages?= =?UTF-8?q?=20enfants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 27 +++++++++++++++++++-------- module/search/search.php | 4 ++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/core/core.php b/core/core.php index 238e9bb2..f6dff366 100755 --- a/core/core.php +++ b/core/core.php @@ -2430,12 +2430,17 @@ class layout extends common { // Mise en page de l'item $itemsLeft .= '
  • '; - if ( $this->getData(['page',$parentPageId,'disable']) === true - AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) - - {$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') + AND $this->getUser('group') < self::GROUP_MODERATOR + ) + ){ + $itemsLeft .= ''; } else { - $itemsLeft .= ''; + $itemsLeft .= ''; } switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { @@ -2485,9 +2490,15 @@ class layout extends common { $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; // Mise en page du sous-item $itemsLeft .= '
  • '; - if ( $this->getData(['page',$childKey,'disable']) === true - AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { - $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') + AND $this->getUser('group') < self::GROUP_MODERATOR + ) + ){ + $itemsLeft .= ''; } else { $itemsLeft .= ''; } diff --git a/module/search/search.php b/module/search/search.php index b2a41f07..49fe78d6 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', $parentId, 'group']) && - $this->getData(['page', $parentId, 'block']) !== 'bar') { + $this->getUser('group') >= $this->getData(['page', $childId, 'group']) && + $this->getData(['page', $childId, 'block']) !== 'bar') { $url = $childId; $titre = $this->getData(['page', $childId, 'title']); $contenu = ' ' . $titre . ' ' . $this->getData(['page', $childId, 'content']);