Commit c6595e22 authored by Meusburger's avatar Meusburger

VERSION 7.3.2

Merge remote-tracking branch 'origin/stable' into hotline-master

Conflicts:
	VERSIONS
	library/startup.php
parents aff074cb a83eaabc
25/08/2015 - v7.3.2
- ticket #11217 : indexation à la volée des notices de la bibliothèque numérique.
- ticket #13566 : Par defaut le nombre de critiques affichées sur une page est 50.
- ticket #25883 : Affichage des tomes par ordre décroissant lorsque l'on clique sur "voir tous les numéros..."
- ticket #11784 : le type de document peut être ajouté en en-tête de notice
- ticket #25393: Renomme le libellé et libellé facette d'un thesaurus si le catalogue associé est renommé.
- ticket #26007: Tri des catégories d'articles par le libelle en list mode
- ticket #28087 : sur une recherche avancée avec "ou" (ex titres=pomme ou auteur=rowling), la sélection des facettes ne fonctionnait plus sur le résultat
- ticket #28472: Correction de l'ajout de boite depuis le front
30/07/2015 - v7.3.1
- tickets #27656, 27657 : Bibliothèque numérique 1DTouch : Prise en charge de l'authentification SSO
......
ticket 28472: Correction de l'ajout de boite depuis l'opac
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Admin_UploadController extends Zend_Controller_Action {
public function preDispatch(){
......@@ -65,8 +65,11 @@ $(document).ready(function () {
return;
}
$this->_helper->json($model->addFile($this->_request));
$result = $model->addFile($this->_request);
$model->save();
$model->index();
$this->_helper->json($result);
return;
}
......
......@@ -48,7 +48,7 @@ class AuthController extends ZendAfi_Controller_Action {
public function getErrorMessages($error_code) {
$messages= [1 => $this->_('Veuillez saisir votre identifiant.'),
2 => $this->_('Identifiant inconnu.'),
4 => $this->_("Votre mail n'est pas renseigné dans votre compte lecteur. Merci de vous adresser à la bibliothèque pour connaître vos identifiants.")];
4 => $this->_("Votre mail n'est pas renseigné dans votre compte lecteur. Merci de vous adresser à la bibliothèque pour récupérer votre mot de passe ou bien le remplacer par un nouveau.")];
if (isset($messages[$error_code]))
return $messages[$error_code];
return '';
......
......@@ -90,6 +90,13 @@ class BlogController extends ZendAfi_Controller_Action {
}
protected function updateBlogConfigDefault() {
if (!$this->view->config['nb_display'] || $this->view->config['nb_display']<1) {
$this->view->config['nb_display']=(new Class_Systeme_ModulesAppli())->getValeursParDefaut('blog', 'viewcritiques')['nb_display'];
}
}
public function viewcritiquesAction() {
$this->view->page = $this->_getParam('page',1);
$id_module = (int)$this->_getParam('id_module');
......@@ -97,7 +104,7 @@ class BlogController extends ZendAfi_Controller_Action {
$preferences = $profil
->getModuleAccueilPreferences($id_module, 'CRITIQUES');
$this->view->config=$profil->getConfigurationOf('blog','viewcritiques','');
$this->updateBlogConfigDefault();
$avis = Class_AvisNotice::getAvisFromPreferences($preferences,[$this->view->page, $this->view->config['nb_display']]);
$this->view->liste_avis = $avis;
......
......@@ -501,8 +501,10 @@ class CatalogueLoader extends Storm_Model_Loader {
public function saveThesaurus($catalogue) {
if ($thesaurus=Class_CodifThesaurus::findThesaurusForCatalogue($catalogue->getId()))
if ($thesaurus=Class_CodifThesaurus::findThesaurusForCatalogue($catalogue->getId())) {
$catalogue->deleteThesaurusInFacette($thesaurus->getIdThesaurus());
$catalogue->updateThesaurusLabel($thesaurus);
}
else
if (!$thesaurus = $catalogue->saveThesauriParents()) return;
......@@ -669,6 +671,18 @@ class Class_Catalogue extends Storm_Model_Abstract {
}
public function updateThesaurusLabel($thesaurus) {
if ($this->getLibelle() == $thesaurus->getLibelleFacette())
return $this;
$thesaurus->setLibelleFacette($this->getLibelle())
->setLibelle($this->getLibelle())
->save();
return $this;
}
public function deleteThesaurusInFacette($id_thesaurus) {
/*
* Sites, articles and RSS records are first destroyed and then get their own selection of domains.
......
......@@ -34,7 +34,7 @@ class Class_CodifTypeDoc extends Storm_Model_Abstract {
const SONORE = 3;
const VIDEO = 4;
const LOGICIEL = 5;
const CODE_FACETTE = 'T';
protected static $_libelles = [
self::INCONNU => 'Non identifié',
self::LIVRE => 'Livre',
......
......@@ -30,6 +30,7 @@ class Class_MoteurRecherche {
$rubriques,
$_domain_conditions = null,
$conditions = '',
$_with_operator_conditions = [],
$_or_conditions = '',
$_filter_domain_conditions = '';
......@@ -104,7 +105,7 @@ class Class_MoteurRecherche {
$this->setCondition('clef_chapeau="' . $serie . '" ');
if ($tri == 'date_creation desc')
$this->order_by = " order by tome_alpha desc";
$this->order_by = " order by cast(tome_alpha as SIGNED INTEGER) desc";
}
......@@ -273,15 +274,13 @@ class Class_MoteurRecherche {
if (!$operateur)
$operateur = 'and';
if($this->conditions)
$this->conditions .= ' ' . $operateur . ' ';
elseif(stripos($operateur, 'NOT'))
$this->conditions .= 'not ';
// Type de recherche
$this->conditions .= ($type_recherche == 'fulltext')
$condition = ($type_recherche == 'fulltext')
? "MATCH(".$name.") AGAINST('".$recherche."' IN BOOLEAN MODE)"
: $name . " like '" . $recherche . "%'";
$this->_with_operator_conditions []= ['operator' => strtolower($operateur),
'condition' => $condition];
}
......@@ -363,6 +362,7 @@ class Class_MoteurRecherche {
public function visitSearchSettings($criteres_recherche) {
$this->criteres_recherche = $criteres_recherche;
$this->conditions = '';
$this->_with_operator_conditions = [];
$this->all_facettes = '';
$this->select_notices = 'id_notice from notices';
$this->nb_mots = 0;
......@@ -375,7 +375,24 @@ class Class_MoteurRecherche {
}
protected function injectWithOperatorConditions() {
if (!$this->_with_operator_conditions)
return $this;
$first_condition = array_shift($this->_with_operator_conditions);
$operators_conditions = '(' . (strpos($first_condition['operator'], 'not') ? 'not ' : '') . $first_condition['condition'];
foreach ($this->_with_operator_conditions as $condition)
$operators_conditions .= ' ' . $condition['operator'] . ' ' . $condition['condition'];
$operators_conditions .= ')';
$this->conditions = implode(' and ', array_filter([$this->conditions, $operators_conditions]));
return $this;
}
public function buildWherePartQuery() {
$this->injectWithOperatorConditions();
if(!is_null($this->_domain_conditions)) {
$this->setCondition($this->_domain_conditions);
return self::getConditionsForRequest($this->conditions, $this->_or_conditions, $this->_filter_domain_conditions);
......
......@@ -650,6 +650,7 @@ class Class_Notice extends Storm_Model_Abstract {
Class_CodifDewey::CODE_FACETTE,
Class_CodifPcdm4::CODE_FACETTE,
Class_CodifMatiere::CODE_FACETTE,
Class_TypeDoc::CODE_FACETTE,
Class_CodifGenre::CODE_FACETTE,
Class_CodifCentreInteret::CODE_FACETTE])) {
$ret = [];
......@@ -1695,7 +1696,13 @@ class Class_Notice extends Storm_Model_Abstract {
public function updateFacetsFromExemplaires() {
$facettes = [];
$filtered = ['B', 'E', 'S', 'Y', 'T', '2', 'V'];
$filtered = [Class_IntBib::CODE_FACETTE,
Class_CodifEmplacement::CODE_FACETTE,
Class_CodifSection::CODE_FACETTE,
Class_CodifAnnexe::CODE_FACETTE,
Class_CodifTypeDoc::CODE_FACETTE,
'2',
Class_Codification::CODE_AVAILABILITY];
foreach (array_filter(explode(' ', $this->getFacettes())) as $f) {
$type = substr($f, 0, 1);
if (in_array($type, $filtered))
......@@ -1703,28 +1710,28 @@ class Class_Notice extends Storm_Model_Abstract {
$facettes []= $f;
}
// facette type de document
$facettes []= 'T' . $this->getTypeDoc();
$facettes []= Class_CodifTypeDoc::CODE_FACETTE. $this->getTypeDoc();
$date_nouveaute = "";
$exemplaires = $this->getExemplaires();
foreach($exemplaires as $exemplaire) {
$facettes []= 'B'.$exemplaire->getIdBib();
$facettes []= Class_IntBib::CODE_FACETTE.$exemplaire->getIdBib();
if ($genre = trim((string)$exemplaire->getGenre()))
$facettes []= 'G'.$genre;
$facettes []= Class_CodifGenre::CODE_FACETTE.$genre;
if ($section = trim((string)$exemplaire->getSection()))
$facettes []= 'S'.$section;
$facettes []= Class_CodifSection::CODE_FACETTE.$section;
if ($emplacement = trim((string)$exemplaire->getEmplacement()))
$facettes []= 'E'.$emplacement;
$facettes []= Class_CodifEmplacement::CODE_FACETTE.$emplacement;
if ($annexe = trim((string)$exemplaire->getAnnexe()))
$facettes []= 'Y'.$annexe;
$facettes []= Class_CodifAnnexe::CODE_FACETTE.$annexe;
if ($exemplaire->isDisponible(true))
$facettes []= 'V'.$exemplaire->getIdBib();
$facettes []= Class_Codification::CODE_AVAILABILITY.$exemplaire->getIdBib();
$date_exemplaire = $exemplaire->getDateNouveaute();
if ($date_exemplaire > $date_nouveaute)
......
......@@ -1964,7 +1964,7 @@ class Class_Profil extends Storm_Model_Abstract {
return
isset($cfg[$module])
? (isset($cfg[$module][$action.$action2])
? $cfg[$module][$action.$action2]
? array_merge($default_cfg,$cfg[$module][$action.$action2])
: $default_cfg)
: $default_cfg;
}
......
......@@ -62,7 +62,8 @@ class ZendAfi_Controller_Action_Helper_ArticleListViewMode extends ZendAfi_Contr
public function getCategories() {
$categories = (!$id_cat = $this->getParam('id_cat'))
? $this->getBib()->getArticleCategories()
: Class_ArticleCategorie::findAllBy(['id_cat_mere' => $id_cat]);
: Class_ArticleCategorie::findAllBy(['id_cat_mere' => $id_cat,
'order' => 'libelle']);
return $this->getFiltredCategories($categories);
}
......
......@@ -64,6 +64,9 @@ class ZendAfi_View_Helper_ListeNotices_Tableau extends ZendAfi_View_Helper_Liste
if (is_array($value))
$value = $value[0];
if (is_array($value) && array_key_exists('libelle',$value))
$value = $value['libelle'];
if($champ == "N") $align='style="text-align:center"'; else $align="";
$html.='<td class="'. $style_css .'" '.$align.'>'.$value.'</td>';
}
......
......@@ -64,7 +64,7 @@ function defineConstant($name, $value) {
function setupConstants() {
defineConstant('BOKEH_MAJOR_VERSION','7.3');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.1');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.2');
defineConstant('ROOT_PATH', realpath(dirname(__FILE__).'/..').'/');
......
......@@ -1593,4 +1593,38 @@ class CatalogueControllerGetBrowsableDomainsJsonTest extends AbstractControllerT
public function domainKornShouldBeAnItem() {
$this->assertContains('"items":[{"id":31,"label":"Korn"', $this->_response->getBody());
}
}
class CatalogueControllerRenamingTest extends AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$this->fixture('Class_Catalogue',
['id' => 6,
'libelle' => 'News']);
$this->postDispatch('/admin/catalogue/edit/id_catalogue/6', ['libelle' => 'Jeunes']);
}
/** @test */
public function domain6LibelleShouldBeJeunes() {
$this->assertEquals('Jeunes', Class_Catalogue::find(6)->getLibelle());
}
/** @test */
public function facet89LibelleShouldBeJeunes() {
$this->assertEquals('Jeunes', Class_CodifThesaurus::findThesaurusForCatalogue(6)->getLibelleFacette());
}
/** @test */
public function facet89LibelleFacetteShouldBeJeunes() {
$this->assertEquals('Jeunes', Class_CodifThesaurus::findThesaurusForCatalogue(6)->getLibelle());
}
}
\ No newline at end of file
......@@ -160,6 +160,16 @@ class CmsControllerListModeAdminBibSubCategoryTest
'titre' => 'Wtf',
'contenu' => 'Welcome',
'id_cat' => 1]);
$other_cat = $this->fixture('Class_ArticleCategorie',
['id' => 2,
'libelle' => 'Lyrics',
'parent_categorie' => $this->root_category,
]);
$other_cat->setBib($this->annecy);
$group = Class_UserGroup::find(22);
Class_ArticleCategorie::find(23)->setLibelle('Modes')->save();
Class_Permission::createArticle()->permitTo($group, $other_cat);
Class_Permission::createArticleCategory()->permitTo($group, $other_cat);
$this->dispatch('/admin/cms/index/id_cat/1', true);
}
......@@ -168,7 +178,7 @@ class CmsControllerListModeAdminBibSubCategoryTest
/** @test */
public function shouldDisplayLibraryInBreadcrumbAtRoot() {
$this->assertXPathContentContains('//a[contains(@href, "admin/cms")]',
'Annecy');
'Annecy',$this->_response->getBody());
}
......@@ -179,9 +189,16 @@ class CmsControllerListModeAdminBibSubCategoryTest
/** @test */
public function shouldDisplayALaUneCategory() {
$this->assertXPathContentContains('//td/a[contains(@href, "cms/index/id_cat/23")]',
'A la Une');
public function shouldDisplayModesCategory() {
$this->assertXPathContentContains('//tr[2]//td/a[1][contains(@href, "cms/index/id_cat/23")]',
'Modes');
}
/** @test */
public function shouldDisplayLyricsCategoryBeforeModes() {
$this->assertXPathContentContains('//tr[1]//td/a[1][contains(@href, "cms/index/id_cat/2")]',
'Lyrics');
}
......
......@@ -122,17 +122,16 @@ abstract class CmsControllerTestCase extends Admin_AbstractControllerTestCase {
public function setupBib() {
$this->annecy = Class_Bib::newInstanceWithId(1, ['id_zone' => 4,
'libelle' => 'Annecy'
]);
$this->annecy->save();
$this->annecy = $this->fixture('Class_Bib',['id' => 1,
'id_zone' => 4,
'libelle' => 'Annecy'
]);
$this->cran_gevrier = Class_Bib::newInstanceWithId(3, ['id_zone' => 4,
'libelle' => 'Cran-Gevrier',
'article_categories' => []]);
$this->cran_gevrier->save();
$this->cran_gevrier = $this->fixture('Class_Bib',['id' => 3,
'id_zone' => 4,
'libelle' => 'Cran-Gevrier',
'article_categories' => []]);
}
......
......@@ -42,6 +42,9 @@ class UploadControllerMultipleActionTest extends AbstractControllerTestCase {
class UploadControllerMultipleProcessPostAction extends AbstractControllerTestCase {
protected
$_storm_default_to_volatile=true;
/** @test */
public function withEmptyRequestResponseShouldContainError() {
$this->dispatch('/admin/upload/multiple-process');
......@@ -95,6 +98,7 @@ class UploadControllerMultipleProcessPostAction extends AbstractControllerTestCa
public function withModelShouldCallFileProcessingMethod() {
$album = Storm_Test_ObjectWrapper::on(Class_Album::getLoader()->newInstance())
->whenCalled('addFile')->answers(array('success' => 'true'))
->whenCalled('index')->answers(null)
->getWrapper();
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Album')
......@@ -130,6 +134,15 @@ class UploadControllerMultipleProcessPostAction extends AbstractControllerTestCa
}
/**
* @depends withModelShouldCallFileProcessingMethod
* @test
*/
public function albumShouldHaveBeenIndexed($album) {
$this->assertTrue($album->methodHasBeenCalled('index'));
}
/**
* @depends withModelShouldCallFileProcessingMethod
* @test
......
......@@ -631,6 +631,31 @@ abstract class ModuleSelectionCritiquesTestCase extends AvisControllersFixturesT
}
class AbonneControllerAvisBlogControllerViewCritiquesDefaultTest extends ModuleSelectionCritiquesTestCase {
public function setUp() {
parent::setUp();
$profil = Class_Profil::getLoader()
->find(2)
->setCfgModules( ['blog' => ['viewcritiques' => ['barre_nav' => 'Critics']]]);
$profil
->save();
$this->dispatch('/opac/blog/viewcritiques/id_profil/2/id_module/3');
}
/** @test */
public function defaultViewCriticsSetTo50() {
$this->assertEquals(50,Class_Profil::find(2)->getConfigurationOf('blog', 'viewcritiques','' )['nb_display']);
}
/** @test */
public function setBarreNavCriticsKeep() {
$this->assertEquals('Critics' ,Class_Profil::find(2)->getConfigurationOf('blog', 'viewcritiques','' )['barre_nav']);
}
}
class AbonneControllerAvisBlogControllerViewCritiquesTest extends ModuleSelectionCritiquesTestCase {
......
......@@ -1212,7 +1212,7 @@ class AuthControllerLostPasswordNoMailPostTest extends AbstractControllerTestCas
/** @test */
public function withoutEmailShouldReturnErrorMessage() {
$this->assertXPathContentContains('//div', "Votre mail n'est pas renseigné dans votre compte lecteur. Merci de vous adresser à la bibliothèque pour connaître vos identifiants.");
$this->assertXPathContentContains('//div', "Votre mail n'est pas renseigné dans votre compte lecteur. Merci de vous adresser à la bibliothèque pour récupérer votre mot de passe ou bien le remplacer par un nouveau.");
}
}
......
......@@ -815,6 +815,7 @@ class CatalogueBuildCriteresRechercheTest extends Storm_Test_ModelTestCase {
class CatalogueThesaurusCRUDTest extends CatalogueParentTest {
protected $_old_sql;
protected $_thesaurus;
public function setUp() {
parent::setUp();
......@@ -822,6 +823,12 @@ class CatalogueThesaurusCRUDTest extends CatalogueParentTest {
$this->mock_sql = Storm_Test_ObjectWrapper::mock();
Zend_Registry::set('sql', $this->mock_sql);
$this->_thesaurus = $this->fixture('Class_CodifThesaurus',
['id' => 200,
'id_thesaurus' => 'YYYYHIST0001',
'libelle' => 'foo']);
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_CodifThesaurus')
->whenCalled('save')
->answers(true)
......@@ -937,7 +944,7 @@ class CatalogueThesaurusCRUDTest extends CatalogueParentTest {
->whenCalled('findThesaurusForCatalogue')
->with(200)
->answers(Class_CodifThesaurus::newInstanceWithId(200)->setIdThesaurus('YYYYHIST0002'));
->answers($this->_thesaurus);
$this->_politique->setParentId($this->_moyenage->getId());
$this->assertEquals('YYYYHIST00030001',
......@@ -962,11 +969,11 @@ class CatalogueThesaurusCRUDTest extends CatalogueParentTest {
->whenCalled('findThesaurusForCatalogue')
->with(100)
->answers(Class_CodifThesaurus::newInstanceWithId(100)->setIdThesaurus('YYYYHIST0002'))
->answers($this->_thesaurus->setIdThesaurus('YYYYHIST0002'))
->whenCalled('findThesaurusForCatalogue')
->with(200)
->answers(Class_CodifThesaurus::newInstanceWithId(200)->setIdThesaurus('YYYYPOLI001'));
->answers($this->_thesaurus->setIdThesaurus('YYYYPOLI001'));
$this->_politique->setParentId($this->_jeux->getId());
$this->assertEquals('YYYY00010005',
Class_Catalogue::saveThesaurus($this->_politique)
......@@ -990,11 +997,11 @@ class CatalogueThesaurusCRUDTest extends CatalogueParentTest {
->whenCalled('findThesaurusForCatalogue')
->with(100)
->answers(Class_CodifThesaurus::newInstanceWithId(100)->setIdThesaurus('YYYYHIST0002'))
->answers($this->_thesaurus->setIdThesaurus('YYYYHIST0002'))
->whenCalled('findThesaurusForCatalogue')
->with(200)
->answers(Class_CodifThesaurus::newInstanceWithId(200)->setIdThesaurus('YYYYPOLI0005'));
->answers($this->_thesaurus->setIdThesaurus('YYYYPOLI0005'));
$this->_politique->setParentId(0);
$this->assertEquals('YYYY0001',
Class_Catalogue::saveThesaurus($this->_politique)
......
......@@ -113,20 +113,20 @@ class MoteurRechercheAvanceeTest extends MoteurRechercheTestCase {
'type_recherche' => 'fulltext',
'pertinence' => false,
'tri' => 'alpha_auteur'] ,
'req_notices' => $this->listSqlWith("MATCH(auteurs) AGAINST('+(FOUCAULT FOUCAULTS FOUKOLT)' IN BOOLEAN MODE)",
'req_notices' => $this->listSqlWith("(MATCH(auteurs) AGAINST('+(FOUCAULT FOUCAULTS FOUKOLT)' IN BOOLEAN MODE))",
'alpha_auteur'),
'req_comptage' => $this->countSqlWith("MATCH(auteurs) AGAINST('+(FOUCAULT FOUCAULTS FOUKOLT)' IN BOOLEAN MODE)"),
'req_facettes' => $this->facetSqlWith("MATCH(auteurs) AGAINST('+(FOUCAULT FOUCAULTS FOUKOLT)' IN BOOLEAN MODE)")],
'req_comptage' => $this->countSqlWith("(MATCH(auteurs) AGAINST('+(FOUCAULT FOUCAULTS FOUKOLT)' IN BOOLEAN MODE))"),
'req_facettes' => $this->facetSqlWith("(MATCH(auteurs) AGAINST('+(FOUCAULT FOUCAULTS FOUKOLT)' IN BOOLEAN MODE))")],
[['rech_auteurs' => 'Bourdieu',
'operateur_auteurs' => 'and',
'type_recherche' => 'commence',
'pertinence' => true,
'tri' => 'alpha_titre'] ,
'req_notices' => $this->listSqlWith("auteurs like 'BOURDIEU%'",
'req_notices' => $this->listSqlWith("(auteurs like 'BOURDIEU%')",
"alpha_titre"),
'req_comptage' => $this->countSqlWith("auteurs like 'BOURDIEU%'"),
'req_facettes' => $this->facetSqlWith("auteurs like 'BOURDIEU%'")],
'req_comptage' => $this->countSqlWith("(auteurs like 'BOURDIEU%')"),
'req_facettes' => $this->facetSqlWith("(auteurs like 'BOURDIEU%')")],
[['rech_auteurs' => 'Clastres',
'operateur_auteurs' => 'and',
......@@ -135,10 +135,10 @@ class MoteurRechercheAvanceeTest extends MoteurRechercheTestCase {
'type_recherche' => 'commence',
'pertinence' => true,
'tri' => 'alpha_titre'] ,
'req_notices' => $this->listSqlWith( "auteurs like 'CLASTRES%' and MATCH(facettes) AGAINST('+YMED1 +(YTUN YTAP)' IN BOOLEAN MODE)",
'req_notices' => $this->listSqlWith( "(auteurs like 'CLASTRES%') and MATCH(facettes) AGAINST('+YMED1 +(YTUN YTAP)' IN BOOLEAN MODE)",
'alpha_titre'),
'req_comptage' => $this->countSqlWith("auteurs like 'CLASTRES%' and MATCH(facettes) AGAINST('+YMED1 +(YTUN YTAP)' IN BOOLEAN MODE)"),
'req_facettes' => $this->facetSqlWith("auteurs like 'CLASTRES%' and MATCH(facettes) AGAINST('+YMED1 +(YTUN YTAP)' IN BOOLEAN MODE)")],
'req_comptage' => $this->countSqlWith("(auteurs like 'CLASTRES%') and MATCH(facettes) AGAINST('+YMED1 +(YTUN YTAP)' IN BOOLEAN MODE)"),
'req_facettes' => $this->facetSqlWith("(auteurs like 'CLASTRES%') and MATCH(facettes) AGAINST('+YMED1 +(YTUN YTAP)' IN BOOLEAN MODE)")],
[['rech_matieres' => 'Philosophie',
'operateur_matieres' => 'and not',
......@@ -149,10 +149,10 @@ class MoteurRechercheAvanceeTest extends MoteurRechercheTestCase {
'type_recherche' => 'commence',
'pertinence' => true,
'tri' => 'alpha_titre'] ,
'req_notices' => $this->listSqlWith("not matieres like 'PHILOSOPHIE%' and annee >='1960' and annee <='2013' and date_creation >'".$this->expected_date."' and MATCH(facettes) AGAINST('+T1' IN BOOLEAN MODE)",
'req_notices' => $this->listSqlWith("annee >='1960' and annee <='2013' and date_creation >'".$this->expected_date."' and (not matieres like 'PHILOSOPHIE%') and MATCH(facettes) AGAINST('+T1' IN BOOLEAN MODE)",
"alpha_titre"),
'req_comptage' => $this->countSqlWith("not matieres like 'PHILOSOPHIE%' and annee >='1960' and annee <='2013' and date_creation >'".$this->expected_date</