diff --git a/CHANGES.md b/CHANGES.md index d90ca1b3..8940fe66 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ # Changelog -## Version 11.0.05 +## Version 11.0.06 - Modifications : - Intégration de la classe layout dans la classe core - Gestion multi-langues diff --git a/README.md b/README.md index be2ba42e..9a3e586f 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ZwiiCMS 11.0.05 +# ZwiiCMS 11.0.06 Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation. diff --git a/core/core.php b/core/core.php index 25bc1d1a..104f85b4 100755 --- a/core/core.php +++ b/core/core.php @@ -45,7 +45,7 @@ class common { // Numéro de version const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; - const ZWII_VERSION = '11.0.05'; + const ZWII_VERSION = '11.0.06'; const ZWII_UPDATE_CHANNEL = "v11"; public static $actions = []; diff --git a/module/search/search.php b/module/search/search.php index 268f3e3e..e71aa931 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -266,7 +266,8 @@ class search extends common { $this->getData(['page', $parentId, 'block']) !== 'bar') { $url = $parentId; $titre = $this->getData(['page', $parentId, 'title']); - $contenu = ' ' . $titre . ' ' . $this->getData(['page', $parentId, 'content']); + $content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $parentId, 'content'])); + $contenu = $titre . ' ' . $contenu ; // Pages sauf pages filles et articles de blog $tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier); if (is_array($tempData) ) { @@ -281,7 +282,8 @@ class search extends common { $this->getData(['page', $parentId, 'block']) !== 'bar') { $url = $childId; $titre = $this->getData(['page', $childId, 'title']); - $contenu = ' ' . $titre . ' ' . $this->getData(['page', $childId, 'content']); + $content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $childId, 'content'])); + $contenu = $titre . ' ' . $contenu ; //Pages filles $tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier); if (is_array($tempData) ) { @@ -289,9 +291,9 @@ class search extends common { } } - // Articles d'une sous-page blog - if ($this->getData(['page', $childId, 'moduleId']) === 'blog' && - $this->getData(['module',$parentId,'posts']) ) + // 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']) ) { foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) { if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) { @@ -308,16 +310,15 @@ class search extends common { } } - // Articles d'un blog - if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' && - $this->getData(['module',$parentId,'posts']) ) { + // 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']) ) { foreach($this->getData(['module',$parentId,'posts']) as $articleId => $article) { if($this->getData(['module',$parentId,'posts',$articleId,'state']) === true) { $url = $parentId. '/' . $articleId; $titre = $article['title']; $contenu = ' ' . $titre . ' ' . $article['content']; - // Articles de Blog $tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier); if (is_array($tempData) ) { $result [] = $tempData;