diff --git a/library/Class/CriteresRecherche.php b/library/Class/CriteresRecherche.php index d7ddc96582a776475b6e19e5dc13d5c8d1273a62..6995d051a59d1524e3e0aa5d540536aad791b67a 100644 --- a/library/Class/CriteresRecherche.php +++ b/library/Class/CriteresRecherche.php @@ -279,8 +279,9 @@ class Class_CriteresRecherche { if ($type_doc = $this->getParam('type_doc')) $visitor->visitTypeDoc($type_doc); - if ($section = $this->getParam('section')) + if ($section = $this->getParam('section')) { $visitor->visitSection($section); + } if ($annexe = $this->getParam('annexe')) $visitor->visitAnnexe($annexe); diff --git a/library/Class/MoteurRecherche.php b/library/Class/MoteurRecherche.php index 3e91a274269de8d5721eda5a6e71849bc2a0bfd0..12b64c23afc082009311252693284c86d64f309a 100644 --- a/library/Class/MoteurRecherche.php +++ b/library/Class/MoteurRecherche.php @@ -137,7 +137,7 @@ class Class_MoteurRecherche { public function visitSection($section) { - $this->visitFiltre('S'.$section); + $this->visitFacette('S'.$section); } diff --git a/library/ZendAfi/View/Helper/TagCriteresRecherche.php b/library/ZendAfi/View/Helper/TagCriteresRecherche.php index 1b22c0785db9071a7d3c58a05066a3e1d9d6ded5..d90bec3b58e5b0bf9a22b627b5af1d665d35dce5 100644 --- a/library/ZendAfi/View/Helper/TagCriteresRecherche.php +++ b/library/ZendAfi/View/Helper/TagCriteresRecherche.php @@ -170,7 +170,9 @@ class ZendAfi_View_Helper_TagCriteresRecherche extends Zend_View_Helper_HtmlElem public function visitSection($section) { - $this->visitFacette('S'.$section); + $url = $this->_criteres_recherche->getUrlCriteresWithoutElement('section'); + $libelle = $this->view->_("Section: %s", Class_Codification::getInstance()->getLibelleFacette("S".$section)); + $this->htmlAppend($this->getSuppressionImgUrlForLibelle($libelle,$url)); } } diff --git a/tests/library/Class/MoteurRechercheTest.php b/tests/library/Class/MoteurRechercheTest.php index 8198506e3a6de12ef9309b3ffddc9daa81ccd5f4..5ccb1a11fd0e7172b7da3c1c3c4901e08f8dc0e4 100644 --- a/tests/library/Class/MoteurRechercheTest.php +++ b/tests/library/Class/MoteurRechercheTest.php @@ -136,7 +136,20 @@ class MoteurRechercheAvanceeTest extends MoteurRechercheAbstractTest { 'req_notices' => "Select id_notice from notices Where auteurs like 'STIEGLER%' and MATCH(facettes) AGAINST('+YMED1 +G23 +A345 +(YTUN YTAP) +(S1 S12 S9) +(B3 B4)' IN BOOLEAN MODE) order by alpha_titre", 'req_comptage' => "Select count(*) from notices Where auteurs like 'STIEGLER%' and MATCH(facettes) AGAINST('+YMED1 +G23 +A345 +(YTUN YTAP) +(S1 S12 S9) +(B3 B4)' IN BOOLEAN MODE)", 'req_facettes' => "Select id_notice,type_doc,facettes from notices Where auteurs like 'STIEGLER%' and MATCH(facettes) AGAINST('+YMED1 +G23 +A345 +(YTUN YTAP) +(S1 S12 S9) +(B3 B4)' IN BOOLEAN MODE) limit 15000" - ] + ] , + + [ ['rech_titres' => 'Les décisions absurdes', 'operateur_auteurs' => 'and', + 'annexe' => 'MED1', + 'facettes' => 'M4669', + 'selection_annexe' => 'TUN;TAP', + 'section' => 1, + 'geo_zone' => 2, + 'type_recherche' => 'commence', 'pertinence' => true, 'tri' => 'alpha_titre'] , + 'req_notices' => "Select id_notice from notices Where titres like 'LES DECISIONS ABSURDES%' and MATCH(facettes) AGAINST('+S1 +YMED1 +M4669 +(YTUN YTAP) +(B3 B4)' IN BOOLEAN MODE) order by alpha_titre", + 'req_comptage' => "Select count(*) from notices Where titres like 'LES DECISIONS ABSURDES%' and MATCH(facettes) AGAINST('+S1 +YMED1 +M4669 +(YTUN YTAP) +(B3 B4)' IN BOOLEAN MODE)", + 'req_facettes' => "Select id_notice,type_doc,facettes from notices Where titres like 'LES DECISIONS ABSURDES%' and MATCH(facettes) AGAINST('+S1 +YMED1 +M4669 +(YTUN YTAP) +(B3 B4)' IN BOOLEAN MODE) limit 15000" + ] + ]; } @@ -398,7 +411,9 @@ class MoteurRechercheGuideeWithOneSubCategorieTest extends MoteurRechercheAbstra 'req_facettes' => "Select id_notice,type_doc,facettes from notices Where MATCH(facettes) AGAINST('+D4* +M52291 +A15067 +(YTUN YTAP) +(S1 S12 S9)' IN BOOLEAN MODE) limit 15000", 'req_allcodif' => "select * from codif_dewey where id_dewey like '4%' and LENGTH(id_dewey)=2 order by id_dewey"//"select * from codif_pcdm4 where id_pcdm4 like '4%' and LENGTH(id_pcdm4)=2 order by id_pcdm4" - ] + ], + + ]; }