From d88e3f790db85c7f1603019166097620132848a2 Mon Sep 17 00:00:00 2001 From: chankalan Date: Tue, 13 Feb 2024 14:57:37 +0100 Subject: [PATCH] jointures pour rechercher dans les chapitres quand on cherche les articles --- libreavous_pipelines.php | 14 +++++++++++--- paquet.xml | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/libreavous_pipelines.php b/libreavous_pipelines.php index 1ed51a2..2cd856d 100644 --- a/libreavous_pipelines.php +++ b/libreavous_pipelines.php @@ -37,7 +37,7 @@ function libreavous_affiche_enfants($flux) { $id_rubrique = sql_getfetsel("id_rubrique", "spip_articles", "id_article=" . intval($id_objet)); $composition_rubrique = sql_getfetsel("composition", "spip_rubriques", "id_rubrique=" . intval($id_rubrique)); - + if ($e['type'] === 'article' and $composition_rubrique === 'emissions') { $flux['data'] .= recuperer_fond( 'prive/objets/liste/chapitres', @@ -46,7 +46,7 @@ function libreavous_affiche_enfants($flux) { 'id_article' => $id_objet ) ); - + if (autoriser('creerchapitredans', 'articles', $id_objet)) { include_spip('inc/presentation'); $flux['data'] .= icone_verticale( @@ -79,7 +79,7 @@ function libreavous_boite_infos($flux) { $flux['data'] = substr_replace($flux['data'], $texte, $p, 0); } } - + return $flux; } @@ -132,3 +132,11 @@ function libreavous_objet_compte_enfants($flux) { } + +function libreavous_rechercher_liste_des_jointures($tables){ + // rechercher en plus dans les chapitres si on cherche dans un article + $tables['article']['chapitre']['titre'] = 5; + $tables['article']['chapitre']['references_sujet'] = 3; + $tables['article']['chapitre']['description_rss'] = 3; + return $tables; +} diff --git a/paquet.xml b/paquet.xml index cb63eae..2428356 100644 --- a/paquet.xml +++ b/paquet.xml @@ -29,6 +29,7 @@ +