diff --git a/module/search/search.php b/module/search/search.php index fca934f..6b1e59f 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -302,11 +302,11 @@ 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(['data_module',$childId,'posts']) ) { - foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) { - if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) { + foreach($this->getData(['data_module',$childId,'posts']) as $articleId => $article) { + if($this->getData(['data_module',$childId,'posts',$articleId,'state']) === true) { $url = $childId . '/' . $articleId; $titre = $article['title']; $contenu = ' ' . $titre . ' ' . $article['content'];