Skip to content
Snippets Groups Projects

Hotline#13959 Restricted To Library Search

Merged Patrick Barroca requested to merge hotline#13959-restricted-to-library-search into hotline_6.44
Compare and
+ 62
14
Preferences
Compare changes
Files
@@ -93,6 +93,7 @@ class Class_CriteresRecherche {
'type_recherche',
'annexe',
'geo_zone',
'geo_bib',
'fil',
'bib_select',
'serie']);
@@ -158,6 +159,11 @@ class Class_CriteresRecherche {
return $this->getParam('geo_zone',false);
}
public function getGeoBib() {
return $this->getParam('geo_bib', false);
}
public function getGenre() {
return $this->getParam('genre', null);
@@ -197,6 +203,11 @@ class Class_CriteresRecherche {
$filtres[]=$bib_ids;
}
if (($geo_bib = $this->getGeoBib())
&& $bib = Class_Bib::find((int)$geo_bib)) {
$filtres[] = ['B'.$bib->getId()];
}
return array_filter($filtres);
}
@@ -425,7 +436,9 @@ class Class_CriteresRecherche {
foreach($valid_parameters as $key) {
if (array_isset($key, $params)) {
if (preg_match('/^operateur_/', $key) && (!array_key_exists(str_replace('operateur_','rech_',$key),$params) || $params[str_replace('operateur_','rech_',$key)]=='')) {
if (preg_match('/^operateur_/', $key)
&& (!array_key_exists(str_replace('operateur_','rech_',$key),$params)
|| $params[str_replace('operateur_','rech_',$key)]=='')) {
continue;
}