Skip to content
Snippets Groups Projects
Commit 5e35d2f8 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

SAV: Fix SIGB patron reader to comply with new Nanook suggests content

parent b16d6213
Branches
Tags
No related merge requests found
......@@ -38,7 +38,6 @@ abstract class Class_WebService_SIGB_AbstractILSDIPatronInfoReader {
protected $_loans = [];
/**
* @param Class_WebService_SIGB_Emprunteur $emprunteur
* @return Class_WebService_SIGB_*_PatronInfoReader
......@@ -99,7 +98,8 @@ abstract class Class_WebService_SIGB_AbstractILSDIPatronInfoReader {
* @param string $data
*/
public function endLoan($data) {
$this->_loans []= $this->_currentLoan;
$this->_loans[] = $this->_currentLoan;
$this->_currentLoan = $this->_current_operation = null;
}
......@@ -124,17 +124,19 @@ abstract class Class_WebService_SIGB_AbstractILSDIPatronInfoReader {
*/
public function endHold($data) {
$this->getEmprunteur()->reservationsAdd($this->_currentHold);
$this->_currentHold = $this->_current_operation = null;
}
public function endTitle($titre) {
if ($this->_xml_parser->inParents('loan') or $this->_xml_parser->inParents('hold'))
if ($this->_isLoanOrHold())
$this->_current_operation->getExemplaire()->setTitre($titre);
}
public function endAuthor($author) {
$this->_current_operation->getExemplaire()->setAuteur($author);
if ($this->_isLoanOrHold())
$this->_current_operation->getExemplaire()->setAuteur($author);
}
......@@ -149,6 +151,12 @@ abstract class Class_WebService_SIGB_AbstractILSDIPatronInfoReader {
public function _getCurrentOperation() {
return $this->_current_operation;
}
protected function _isLoanOrHold() {
return ($this->_xml_parser->inParents('loan')
or $this->_xml_parser->inParents('hold'));
}
}
?>
\ No newline at end of file
......@@ -247,6 +247,17 @@ class NanookFixtures {
<locationLabel>Site Principal</locationLabel>
</hold>
</holds>
<suggests>
<suggest>
<site>1</site>
<status>En attente</status>
<title></title>
<author></author>
<isbnEan></isbnEan>
<descLink></descLink>
<comment>Tittre :Alzheimer mon amour Auteur : Cécile HUGUENIN</comment>
</suggest>
</suggests>
</GetPatronInfo>';
}
......
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