From 1db350e937a2a06bd1c21df1d601ff5e8de4b270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Sat, 28 May 2022 18:03:43 +0200 Subject: [PATCH] search simplification du test --- module/search/search.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/module/search/search.php b/module/search/search.php index dab8b724..0c46699f 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -254,12 +254,7 @@ class search extends common { } // Articles d'une sous-page blog ou de news - if ( - ( $this->getData(['page', $childId, 'moduleId']) === 'blog' - || $this->getData(['page', $childId, 'moduleId']) === 'news' - || $this->getData(['page', $childId, 'moduleId']) === 'download' - ) - && $this->getData(['module',$childId,'posts']) + if ( $this->getData([ 'module', $childId, 'posts', 'content']) ) { foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) { if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) { @@ -277,12 +272,7 @@ class search extends common { } // Articles d'un blog ou de news - if ( - ( $this->getData(['page', $parentId, 'moduleId']) === 'blog' - || $this->getData(['page', $parentId, 'moduleId']) === 'news' - || $this->getData(['page', $parentId, 'moduleId']) === 'download' - ) - && $this->getData(['module',$parentId,'posts']) + if ( $this->getData([ 'module', $parentId, 'posts', 'content']) ) { foreach($this->getData(['module',$parentId,'posts']) as $articleId => $article) {