diff --git a/application/modules/telephone/views/scripts/abonne/fiche.phtml b/application/modules/telephone/views/scripts/abonne/fiche.phtml index 59134f5a1616d2c48cd20a3c3ec02f73fb724a44..fbfa947f88e471482e7ddf6130dc770643dce0f5 100644 --- a/application/modules/telephone/views/scripts/abonne/fiche.phtml +++ b/application/modules/telephone/views/scripts/abonne/fiche.phtml @@ -43,5 +43,5 @@ echo $this->abonne_Loans($this->user, $cards->getLoansWithOutPNB(), $this->_('Me if ($this->user->hasPNB()) echo $this->abonne_Loans($this->user, $this->user->getPNBLoans(), $this->_('Mes prêts numériques')); -echo $this->abonne_Holds($cards->getHolds()); +echo $this->abonne_Holds($this->user, $cards->getHolds()); ?> diff --git a/library/Class/Exemplaire.php b/library/Class/Exemplaire.php index 0d8939c1607d36534c368e2252cd39cf2458c05b..1d38354efad366961fa2aaa0176d888838cb60d7 100644 --- a/library/Class/Exemplaire.php +++ b/library/Class/Exemplaire.php @@ -31,7 +31,6 @@ class Class_ExemplaireLoader extends Storm_Model_Loader { if (!array_filter($params)) return null; - if(!($int_bibs = Class_IntBib::findAllAvailableForUser($user)) || $int_bibs->isEmpty()) return null; diff --git a/library/ZendAfi/View/Helper/Abonne/Loans.php b/library/ZendAfi/View/Helper/Abonne/Loans.php index f10a2164b1a1c146d165975e7d8f7757f0421b85..c4aef2f5ea1636c0d6f3736b1cad9d2064564752 100644 --- a/library/ZendAfi/View/Helper/Abonne/Loans.php +++ b/library/ZendAfi/View/Helper/Abonne/Loans.php @@ -78,7 +78,7 @@ class ZendAfi_View_Helper_Abonne_Loans extends ZendAfi_View_Helper_BaseHelper { protected function renderLoan($user, $loan) { $record_title = $loan->getTitre(); $record = new Class_Entity(); - if($item = Class_Exemplaire::findFirstBySIGBOperation($user,$loan)) + if($item = Class_Exemplaire::findFirstBySIGBOperation($user, $loan)) $record = $item->getNotice(); if ($record) diff --git a/library/ZendAfi/View/Helper/Telephone/Abonne/Holds.php b/library/ZendAfi/View/Helper/Telephone/Abonne/Holds.php index 7eedb7ccbdb030bfc6d76e36d6b9956cb8d310a9..e08fabfa8abd0d576ab3d9aadd85c0ff276fae28 100644 --- a/library/ZendAfi/View/Helper/Telephone/Abonne/Holds.php +++ b/library/ZendAfi/View/Helper/Telephone/Abonne/Holds.php @@ -23,10 +23,10 @@ class ZendAfi_View_Helper_Telephone_Abonne_Holds extends ZendAfi_View_Helper_Telephone_Abonne_Operations { - public function Abonne_Holds($holds) { + public function Abonne_Holds($user, $holds) { $this->_title = $this->_('Mes réservations'); $this->_no_operation_text = $this->_('Vous n\'avez aucune reservation en cours'); - return $this->abonne_Operations($holds); + return $this->abonne_Operations($user, $holds); } diff --git a/library/ZendAfi/View/Helper/Telephone/Abonne/Loans.php b/library/ZendAfi/View/Helper/Telephone/Abonne/Loans.php index c3cfdba70ed327b3fbcaf40fdae9896060c6d307..371e8f306e9c51605fce320d8151733e4686e76f 100644 --- a/library/ZendAfi/View/Helper/Telephone/Abonne/Loans.php +++ b/library/ZendAfi/View/Helper/Telephone/Abonne/Loans.php @@ -22,10 +22,10 @@ class ZendAfi_View_Helper_Telephone_Abonne_Loans extends ZendAfi_View_Helper_Telephone_Abonne_Operations { - public function abonne_Loans($loans, $title) { + public function abonne_Loans($user, $loans, $title) { $this->_no_operation_text = $this->_('Vous n\'avez aucun prêt en cours'); $this->_title = $title; - return $this->abonne_Operations($loans); + return $this->abonne_Operations($user, $loans); } diff --git a/library/ZendAfi/View/Helper/Telephone/Abonne/Operations.php b/library/ZendAfi/View/Helper/Telephone/Abonne/Operations.php index efd0bfccfb9f977b9b123c3c17d7574c07fd9ea6..160419351bb864fd9cfe0a4300acafe267ca4892 100644 --- a/library/ZendAfi/View/Helper/Telephone/Abonne/Operations.php +++ b/library/ZendAfi/View/Helper/Telephone/Abonne/Operations.php @@ -24,12 +24,12 @@ class ZendAfi_View_Helper_Telephone_Abonne_Operations extends ZendAfi_View_Helpe protected $_operations = [], $_title = '', - $_no_operation_text = '' - ; + $_no_operation_text = '', + $_user; - public function abonne_Operations($operations) { + public function abonne_Operations($user, $operations) { $this->_operations = $operations; - + $this->_user = $user; return $this->_tag('ul', $this->_renderTitle() . $this->_renderOperations(), ['data-role' => 'listview',