Skip to content
Snippets Groups Projects
Commit d696c720 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #18087 orphea fix tests failures

parent 291d9b02
Branches
Tags
3 merge requests!780Master,!737Dev #18087 orphea harvest,!723Dev #18087 orphea harvest
......@@ -82,7 +82,7 @@ class Class_WebService_BibNumerique_Orphea extends Class_WebService_BibNumerique
public function harvestPage($unid, $page = 1, $total_records = '') {
if (!$this->getUNID()) {
if (!$this->getUNID($unid)) {
return ['error' => $this->unid_parser->getFullMessage()];
}
......@@ -115,12 +115,14 @@ class Class_WebService_BibNumerique_Orphea extends Class_WebService_BibNumerique
}
protected function getUNID() {
protected function getUNID($unid = '') {
if(!$this->_unid)
$this->_unid = $unid;
if(!$this->_unid) {
$http_client = self::getHttpClient();
$content = $http_client->open_url($this->createSessionUrl());
if(!$this->_unid = $this->unid_parser->parseXML($content)->getUNID())
return '';
$this->_unid = $this->unid_parser->parseXML($content)->getUNID();
}
return $this->_unid;
......
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