search simplification du test

This commit is contained in:
Fred Tempez 2022-05-28 18:03:43 +02:00
parent 899b02cf79
commit 1db350e937
1 changed files with 2 additions and 12 deletions

View File

@ -254,12 +254,7 @@ class search extends common {
} }
// Articles d'une sous-page blog ou de news // Articles d'une sous-page blog ou de news
if ( if ( $this->getData([ 'module', $childId, 'posts', 'content'])
( $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) { foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) {
if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) { if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) {
@ -277,12 +272,7 @@ class search extends common {
} }
// Articles d'un blog ou de news // Articles d'un blog ou de news
if ( if ( $this->getData([ 'module', $parentId, 'posts', 'content'])
( $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) { foreach($this->getData(['module',$parentId,'posts']) as $articleId => $article) {