From 5d57ac433254d523a595cb4bd90470710922f2de Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 5 Jul 2019 00:04:34 +0200 Subject: [PATCH] =?UTF-8?q?[9.2.00.dev]=20serach=20exclure=20les=20barres?= =?UTF-8?q?=20lat=C3=A9rales=20de=20la=20recherche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/search/search.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/module/search/search.php b/core/module/search/search.php index 1f663379..2e9d98ca 100644 --- a/core/module/search/search.php +++ b/core/module/search/search.php @@ -42,9 +42,10 @@ class search extends common { //Pour affichage de l'entĂȘte du rĂ©sultat $result = '

Recherche avec le mot clef : '.$motclef.'

'; if ($motclef !== "" && strlen($motclef) > 2) { - foreach($this->getHierarchy(null,true,null) as $parentId => $childIds) { + foreach($this->getHierarchy(null,false,null) as $parentId => $childIds) { if ($this->getData(['page', $parentId, 'disable']) === false && - $this->getUser('group') >= $this->getData(['page', $parentId, 'group'])) { + $this->getUser('group') >= $this->getData(['page', $parentId, 'group']) && + $this->getData(['page', $parentId, 'block']) !== 'bar') { $url = $parentId; $titre = $this->getData(['page', $parentId, 'title']); $contenu = $this->getData(['page', $parentId, 'content']); @@ -55,7 +56,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->getUser('group') >= $this->getData(['page', $parentId, 'group']) && + $this->getData(['page', $parentId, 'block']) !== 'bar') { $url = $childId; $titre = $this->getData(['page', $childId, 'title']); $contenu = $this->getData(['page', $childId, 'content']);