Skip to content
Snippets Groups Projects
Commit 4dcb6907 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Fix Ariege Réservation sur un exemplaire réseau. Choix de bib

parent 04cecdf8
No related merge requests found
......@@ -744,9 +744,13 @@ class RechercheController extends ZendAfi_Controller_Action {
return ;
if (($central_library_id = Class_CosmoVar::get('centralized_hold_mode'))
&& (in_array($central_library_id,[ $this->_getParam('code_annexe'),
$this->_getParam('int_bib')
]))) {
&& ((in_array($central_library_id,[ $this->_getParam('code_annexe'),
$this->_getParam('int_bib')
]))
||(($item = Class_Exemplaire::find($this->_getParam('copy_id')))
&& ($central_library_id == $item->getIdIntBib()))
|| (!$this->isItemOnSameIls($item))
)) {
$this->_forward('reservationajax');
return;
}
......@@ -788,6 +792,17 @@ class RechercheController extends ZendAfi_Controller_Action {
}
protected function isItemOnSameIls(Class_Exemplaire $item) : bool {
if (!$user = Class_Users::getIdentity())
return false;
if (!$exemplaire_intbib =$item->getIntBib())
return false;
if (!$user_intbib = $user->getIntBib())
return false;
return $exemplaire_intbib->getUrlServer() == $user_intbib->getUrlServer();
}
protected function _addLocationsFromCodifTo(Zend_Form_Element $element) : array{
$locations = [];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment