From 9c6ef7a3463a59df4efda0e6473b380fc38964ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 26 May 2022 19:37:47 +0200 Subject: [PATCH] search correctif pour download --- module/search/search.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/module/search/search.php b/module/search/search.php index ae75307f..dab8b724 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -19,7 +19,7 @@ class search extends common { - const VERSION = '2.4'; + const VERSION = '2.5'; const REALNAME = 'Recherche'; const DATADIRECTORY = self::DATA_DIR . 'search/'; @@ -254,9 +254,13 @@ 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(['module',$parentId,'posts']) ) - { + if ( + ( $this->getData(['page', $childId, 'moduleId']) === 'blog' + || $this->getData(['page', $childId, 'moduleId']) === 'news' + || $this->getData(['page', $childId, 'moduleId']) === 'download' + ) + && $this->getData(['module',$childId,'posts']) + ) { foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) { if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) { $url = $childId . '/' . $articleId; @@ -273,8 +277,14 @@ 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(['module',$parentId,'posts']) ) { + if ( + ( $this->getData(['page', $parentId, 'moduleId']) === 'blog' + || $this->getData(['page', $parentId, 'moduleId']) === 'news' + || $this->getData(['page', $parentId, 'moduleId']) === 'download' + ) + && $this->getData(['module',$parentId,'posts']) + ) { + foreach($this->getData(['module',$parentId,'posts']) as $articleId => $article) { if($this->getData(['module',$parentId,'posts',$articleId,'state']) === true) {